Text widgets are back-buffered widget which display full texts, i.e. More...
#include <OSDLTextWidget.h>
Public Types | |
enum | Shape { SquareCorners, RoundCorners } |
Describes the shape of a text container:
RoundCorners: the text is in a box with round corners. More... | |
enum | BaseColorMode { BackgroundColor, Colorkey, None, NotInitialized } |
Describes the available modes for handling the base color of a widget. More... | |
enum | DisplayType { BackBuffer, ClassicalScreenSurface, OpenGLScreenSurface } |
Describes the display type of a surface: More... | |
Public Member Functions | |
TextWidget (Surface &container, const Point2D &relativePosition, Length width, Length maximumHeight, Shape shape, Pixels::ColorDefinition textColor, Pixels::ColorDefinition edgeColor, Pixels::ColorDefinition backgroundColor, const std::string &text, Text::Font &font, bool minimumHeight=true, bool verticallyAligned=true, bool justified=true, Text::Font::RenderQuality quality=Text::Font::Blended, const std::string &title="", bool minMaximizable=false, bool draggable=false, bool wrappable=false, bool closable=false) | |
Creates a back-buffered widget whose role is to display text. | |
virtual | ~TextWidget () throw () |
Basic virtual destructor. | |
virtual void | setText (const std::string &newText) |
Sets the new text this widget should render. | |
virtual const std::string & | getText () const |
Returns the text which is currently being displayed by this widget. | |
virtual Text::TextIndex | getRenderIndex () const |
Returns the current index of the first character of current text that could not be rendered in this widget, if a rendering has already been done. | |
virtual void | redrawBackBuffer () |
Triggers the actual internal rendering. | |
virtual const std::string | toString (Ceylan::VerbosityLevels level=Ceylan::high) const |
Returns an user-friendly description of the state of this object. | |
virtual void | resize (Length newWidth, Length newHeight, bool ignored=false) |
Resizes both this widget and its back-buffer so that their new dimensions are the specified ones. | |
virtual void | setBaseColorMode (BaseColorMode newBaseColorMode, Pixels::ColorDefinition newBaseColor) |
Sets the current base color mode and base color, for both surfaces (back-buffer and overall). | |
virtual void | redraw () |
Redraws this widget, by updating itself (if necessary) and then updating its sub-widgets, by blitting all of them (this widget, then all sub-widgets from bottom to top) to the back-buffer and then blitting the resulting back-buffer in the parent container of this widget. | |
virtual void | redrawInternal () |
This method manages this widget so that no useless internal rendering is performed. | |
Surface & | getWidgetRenderTarget () |
Returns the surface that should be targeted by widgets having to blit their renderings to their container. | |
virtual void | setWidth (Length newWidth) |
Sets the current width of this widget. | |
virtual void | setHeight (Length newHeight) |
Sets the current height of this widget. | |
virtual BaseColorMode | getBaseColorMode () const |
Returns the current base color mode. | |
virtual Pixels::ColorDefinition | getBaseColor () const |
Returns the current base color. | |
virtual void | setDecorationStatus (bool newDecorationStatus) |
Sets the current decoration status, so that this widget will have decorations or not after this method is called. | |
virtual const UprightRectangle & | getClientArea () const |
Returns an upright rectangle which describes the client area, in widget referential. | |
virtual bool | clean () |
Cleans the widget by blanking it with a background color, or a colorkey, or does nothing, depending on base color mode being respectively BackgroundColor, or Colorkey, or None. | |
virtual void | beNotifiedOf (const Ceylan::Event &newEvent) |
Notifies this widget of a new event whose source is its container. | |
virtual void | setRedrawState (bool needsToBeRedrawn) |
Sets redraw state. | |
virtual Clonable & | clone () const |
Clones this Surface: creates a new Surface, exact copy of this Surface, but with no data shared with it at all. | |
virtual LowLevelSurface & | getSDLSurface () const |
Returns the SDL surface corresponding to that surface. | |
virtual void | setSDLSurface (LowLevelSurface &newSurface, DisplayType displayType=BackBuffer) |
Sets this surface so that it corresponds to the supplied SDL surface. | |
virtual DisplayType | getDisplayType () const |
Returns the display type (back-buffer, screen, etc. | |
virtual void | setDisplayType (DisplayType newDisplayType) |
Sets the new display type (back-buffer, screen, etc. | |
virtual Ceylan::Flags | getFlags () const |
Returns the flags caracterizing this surface. | |
virtual void | setFlags (Ceylan::Flags newFlags) |
Sets the flags caracterizing this surface. | |
virtual void | convertToDisplay (bool alphaChannelWanted=true) |
Converts the internal surface to the pixel format of the display, so that any blit of this surface to the screen is quicker. | |
virtual void | setAlpha (Ceylan::Flags flags, Pixels::ColorElement newAlpha) |
Adjusts the alpha properties of the surface: sets the per-surface alpha value and/or enables or disables alpha blending. | |
Pixels::ColorDefinition | guessColorKeyDefinition () const |
Returns the color definition of the colorkey of this surface, as attempted to be guessed from the actual pixel colors (alpha not taken into account). | |
Pixels::PixelColor | guessColorKey () const |
Returns the pixel color of the colorkey of this surface, as attempted to be guessed from the actual pixel colors (alpha not taken into account). | |
virtual void | setColorKey (Ceylan::Flags flags, Pixels::PixelColor keyPixelColor) |
Sets the color key (transparent pixel) in a blittable surface, and enables or disables RLE blit acceleration. | |
virtual void | setColorKey (Ceylan::Flags flags, Pixels::ColorDefinition keyColorDef) |
Sets the color key (transparent pixel) in a blittable surface, and enables or disables RLE blit acceleration. | |
virtual void | convertFromColorKeyToAlphaChannel () |
Converts this surface, which must use a color key, so that it uses an alpha channel instead. | |
virtual Palette & | getPalette () const |
Returns a palette associated with this surface, if any. | |
virtual bool | setPalette (const Palette &newPalette, ColorCount startingColorIndex=0, ColorCount numberOfColors=0, Ceylan::Flags targetedPalettes=Palette::Logical|Palette::Physical) |
Sets this surface's palette thanks to specified one. | |
Surface & | createColorReducedSurfaceFor (const Palette &palette, bool manageColorkey=true) const |
Returns a newly created 8-bit (indexed) color surface, whose pixels have been chosen in the specified palette to match best with the pixel of the surface the method has been called on. | |
virtual Pixels::PixelFormat & | getPixelFormat () const |
Returns this surface's pixel format. | |
virtual void | setPixelFormat (Pixels::PixelFormat &newFormat) |
Sets this surface's pixel format. | |
virtual Pitch | getPitch () const |
Returns this surface's pitch. | |
virtual void | setPitch (Pitch newPitch) |
Sets this surface's pitch. | |
virtual Length | getWidth () const |
Returns the width of this Surface. | |
virtual Length | getHeight () const |
Returns the height of this Surface. | |
virtual BitsPerPixel | getBitsPerPixel () const |
Returns this surface's color depth, bits per pixel. | |
virtual void | setBitsPerPixel (BitsPerPixel newBitsPerPixel) |
Sets this surface's color depth, bits per pixel. | |
virtual BytesPerPixel | getBytesPerPixel () const |
Returns this surface's overall color depth, bytes per pixel. | |
virtual void | setBytesPerPixel (BytesPerPixel newBytesPerPixel) |
Sets this surface's color depth, bytes per pixel. | |
virtual void * | getPixels () const |
Returns this surface's video buffer, i.e. | |
virtual void | setPixels (void *newPixels) |
Sets this surface's video buffer, i.e. | |
virtual bool | fill (Pixels::ColorDefinition colorDef=Pixels::Black) |
Fills this surface with specified color. | |
virtual bool | clear () |
Clears this surface, which may be the screen surface. | |
virtual Surface & | flipVertical () const |
Returns the result of a vertical flip of this source surface: the result will contain the original image mirrored according to a vertical line splitting this surface into a left and right area of equal size. | |
virtual Surface & | flipHorizontal () const |
Returns the result of an horizontal flip of this source surface: the result will contain the original image mirrored according to an horizontal line splitting this surface into a top and bottom area of equal size. | |
virtual std::string | describePixelAt (Coordinate x, Coordinate y) |
Returns a textual description of the pixel of this surface located at [x;y]. | |
virtual Pixels::PixelColor | getPixelColorAt (Coordinate x, Coordinate y) const |
Returns the pixel color of one particular pixel of this surface, located at [x;y], encoded according to the pixel format of this surface. | |
virtual Pixels::ColorDefinition | getColorDefinitionAt (Coordinate x, Coordinate y) const |
Returns the color definition of one particular pixel of this surface, located at [x;y]. | |
virtual void | putRGBAPixelAt (Coordinate x, Coordinate y, Pixels::ColorElement red, Pixels::ColorElement green, Pixels::ColorElement blue, Pixels::ColorElement alpha=Pixels::AlphaOpaque, bool blending=true, bool clipping=true, bool locking=false) |
Sets the pixel at [x;y] of this surface to the given color, specified as separate RGBA coordinates. | |
virtual void | putColorDefinitionAt (Coordinate x, Coordinate y, Pixels::ColorDefinition colorDef, bool blending=true, bool clipping=true, bool locking=false) |
Sets the pixel at [x;y] of this surface to the given color, specified as a color definition (set of RGBA coordinates). | |
virtual void | putPixelColorAt (Coordinate x, Coordinate y, Pixels::PixelColor convertedColor, Pixels::ColorElement alpha=Pixels::AlphaOpaque, bool blending=true, bool clipping=true, bool locking=false) |
Sets the pixel at [x;y] of this surface to the given color, specified as an already converted RGBA color. | |
virtual bool | setAlphaForColor (Pixels::ColorDefinition colorDef, Pixels::ColorElement newAlpha) |
virtual bool | drawHorizontalLine (Coordinate xStart, Coordinate xStop, Coordinate y, Pixels::ColorElement red, Pixels::ColorElement green, Pixels::ColorElement blue, Pixels::ColorElement alpha=Pixels::AlphaOpaque) |
Draws an horizontal line ranging from point (xStart;y), included, to point (xStop;y), included if and only if endpoint drawing mode is set, with specified RGBA color, in this surface. | |
virtual bool | drawHorizontalLine (Coordinate xStart, Coordinate xStop, Coordinate y, Pixels::PixelColor actualColor) |
Draws an horizontal line ranging from point (xStart;y), included, to point (xStop;y), included if and only if endpoint drawing mode is set, with specified actual RGBA pixel color, in this surface. | |
virtual bool | drawHorizontalLine (Coordinate xStart, Coordinate xStop, Coordinate y, Pixels::ColorDefinition colorDef=Pixels::White) |
Draws an horizontal line ranging from point (xStart;y), included, to point (xStop;y), included if and only if endpoint drawing mode is set, with specified RGBA color, in this surface. | |
virtual bool | drawVerticalLine (Coordinate x, Coordinate yStart, Coordinate yStop, Pixels::ColorElement red, Pixels::ColorElement green, Pixels::ColorElement blue, Pixels::ColorElement alpha=Pixels::AlphaOpaque) |
Draws a vertical line ranging from point (x;yStart), included, to point (x;yStop), included if and only if endpoint drawing mode is set, with specified RGBA color, in this surface. | |
virtual bool | drawVerticalLine (Coordinate x, Coordinate yStart, Coordinate yStop, Pixels::ColorDefinition colorDef=Pixels::White) |
Draws a vertical line ranging from point (x;yStart), included, to point (x;yStop), included if and only if endpoint drawing mode is set, with specified RGBA color, in this surface. | |
virtual bool | drawLine (Coordinate xStart, Coordinate yStart, Coordinate xStop, Coordinate yStop, Pixels::ColorElement red, Pixels::ColorElement green, Pixels::ColorElement blue, Pixels::ColorElement alpha=Pixels::AlphaOpaque) |
Draws a line in this surface, ranging from point (xStart;yStart), included, to point (xStop;yStop), included if and only if endpoint drawing mode is set, with specified RGBA color. | |
virtual bool | drawLine (Coordinate xStart, Coordinate yStart, Coordinate xStop, Coordinate yStop, Pixels::ColorDefinition=Pixels::White) |
Draws a line in this surface, ranging from point (xStart;yStart), included, to point (xStop;yStop), included if and only if endpoint drawing mode is set, with specified RGBA color. | |
virtual bool | drawCross (const TwoDimensional::Point2D ¢er, Pixels::ColorDefinition colorDef=Pixels::White, Length squareEdge=5) |
Draws a cross centered in center, included in a square whose length of edge is squareEdge. | |
virtual bool | drawCross (Coordinate xCenter, Coordinate yCenter, Pixels::ColorDefinition colorDef=Pixels::White, Length squareEdge=5) |
Draws a cross centered in center, included in a square whose length of edge is squareEdge. | |
virtual bool | drawEdges (Pixels::ColorDefinition edgeColor=Pixels::White, Length edgeWidth=1) |
Draws the edges of this surface, with specified color and edge width. | |
virtual bool | drawBox (const UprightRectangle &rectangle, Pixels::ColorElement red, Pixels::ColorElement green, Pixels::ColorElement blue, Pixels::ColorElement alpha=Pixels::AlphaOpaque, bool filled=true) |
Draws a box with specified RGBA color. | |
virtual bool | drawBox (const UprightRectangle &rectangle, Pixels::ColorDefinition colorDef=Pixels::White, bool filled=true) |
Draws a box with specified RGBA color. | |
virtual bool | drawCircle (Coordinate xCenter, Coordinate yCenter, Length radius, Pixels::ColorElement red, Pixels::ColorElement green, Pixels::ColorElement blue, Pixels::ColorElement alpha=Pixels::AlphaOpaque, bool filled=true, bool blended=true) |
Draws a circle whose center is (xCenter,yCenter) of specified radius, with specified RGBA color, on this surface. | |
virtual bool | drawCircle (Coordinate xCenter, Coordinate yCenter, Length radius, Pixels::ColorDefinition colorDef=Pixels::White, bool filled=true, bool blended=true) |
Draws a circle whose center is (xCenter,yCenter) of specified radius, with specified RGBA color, on this surface. | |
virtual bool | drawDiscWithEdge (Coordinate xCenter, Coordinate yCenter, Length outerRadius, Length innerRadius, Pixels::ColorDefinition ringColorDef=Pixels::Blue, Pixels::ColorDefinition discColorDef=Pixels::White, bool blended=true) |
Draws a disc whose center is (xCenter,yCenter), of specified radius (totalRadius), filled with specified color discColorDef, with a ring in it, on its border, i.e. | |
virtual bool | drawEllipse (Coordinate xCenter, Coordinate yCenter, Length horizontalRadius, Length verticalRadius, Pixels::ColorElement red, Pixels::ColorElement green, Pixels::ColorElement blue, Pixels::ColorElement alpha=Pixels::AlphaOpaque, bool filled=true) |
Draws an ellipse whose center is (xCenter,yCenter), with specified horizontal and vertical radii, with specified RGBA color, on this surface. | |
virtual bool | drawEllipse (Coordinate xCenter, Coordinate yCenter, Length horizontalRadius, Length verticalRadius, Pixels::ColorDefinition colorDef, bool filled=true) |
Draws an ellipse whose center is (xCenter,yCenter), with specified horizontal and vertical radii, with specified RGBA color, on this surface. | |
virtual bool | drawPie (Coordinate xCenter, Coordinate yCenter, Length radius, Ceylan::Maths::AngleInDegrees angleStart, Ceylan::Maths::AngleInDegrees angleStop, Pixels::ColorElement red, Pixels::ColorElement green, Pixels::ColorElement blue, Pixels::ColorElement alpha=Pixels::AlphaOpaque) |
Draws a polygon-based filled pie whose center is (xCenter,yCenter) of specified radius, with specified RGBA color, on this surface, starting from angleStart, stopping to angleStop, both expressed in degrees. | |
virtual bool | drawPie (Coordinate xCenter, Coordinate yCenter, Length radius, Ceylan::Maths::AngleInDegrees angleStart, Ceylan::Maths::AngleInDegrees angleStop, Pixels::ColorDefinition colorDef) |
Draws a polygon-based filled pie whose center is (xCenter,yCenter) of specified radius, with specified RGBA color, on this surface, starting from angleStart, stopping to angleStop. | |
virtual bool | drawTriangle (Coordinate x1, Coordinate y1, Coordinate x2, Coordinate y2, Coordinate x3, Coordinate y3, Pixels::ColorElement red, Pixels::ColorElement green, Pixels::ColorElement blue, Pixels::ColorElement alpha=Pixels::AlphaOpaque, bool filled=true) |
Draws a triangle defined by specified three points, with specified RGBA color, on this surface. | |
virtual bool | drawTriangle (Coordinate x1, Coordinate y1, Coordinate x2, Coordinate y2, Coordinate x3, Coordinate y3, Pixels::ColorDefinition colorDef, bool filled=true) |
Draws a triangle defined by specified three points, with specified RGBA color, on this surface. | |
virtual bool | drawTriangle (const TwoDimensional::Point2D &p1, const TwoDimensional::Point2D &p2, const TwoDimensional::Point2D &p3, Pixels::ColorElement red, Pixels::ColorElement green, Pixels::ColorElement blue, Pixels::ColorElement alpha=Pixels::AlphaOpaque, bool filled=true) |
Draws a triangle defined by specified three points, with specified RGBA color, on this surface. | |
virtual bool | drawTriangle (const TwoDimensional::Point2D &p1, const TwoDimensional::Point2D &p2, const TwoDimensional::Point2D &p3, Pixels::ColorDefinition colorDef, bool filled=true) |
Draws a triangle defined by specified three points, with specified RGBA color, on this surface. | |
virtual bool | drawPolygon (const std::list< TwoDimensional::Point2D * > summits, Coordinate x, Coordinate y, Pixels::ColorElement red, Pixels::ColorElement green, Pixels::ColorElement blue, Pixels::ColorElement alpha=Pixels::AlphaOpaque, bool filled=true) |
Draws a polygon defined by specified list of points, with specified RGBA color, on specified surface. | |
virtual bool | drawPolygon (const std::list< TwoDimensional::Point2D * > summits, Coordinate x, Coordinate y, Pixels::ColorDefinition colorDef, bool filled=true) |
Draws a polygon defined by specified list of points, with specified RGBA color, on specified surface. | |
virtual bool | drawGrid (Length columnStride=20, Length rowStride=20, Pixels::ColorDefinition lineColor=Pixels::White, bool fillBackground=false, Pixels::ColorDefinition backgroundColor=Pixels::Black) |
Draws a grid, with specified space between columns and rows and specified colors. | |
virtual bool | printText (const std::string &text, Coordinate x, Coordinate y, Pixels::ColorElement red, Pixels::ColorElement green, Pixels::ColorElement blue, Pixels::ColorElement alpha=Pixels::AlphaOpaque) |
Prints specified string on this surface, with specified color, taking as upper left corner specified coordinates. | |
virtual bool | printText (const std::string &text, Coordinate x, Coordinate y, Pixels::ColorDefinition colorDef=Pixels::White) |
Prints specified string on this surface, with specified color, taking as upper left corner specified coordinates. | |
virtual bool | blitTo (Surface &targetSurface) const |
Blits this surface onto specified surface. | |
virtual bool | blitTo (Surface &targetSurface, Coordinate x, Coordinate y) const |
Blits this surface onto specified surface. | |
virtual bool | blitTo (Surface &targetSurface, const TwoDimensional::Point2D &location) const |
Blits this surface onto specified surface. | |
virtual bool | blitTo (Surface &targetSurface, const TwoDimensional::UprightRectangle &sourceRectangle, const TwoDimensional::Point2D &destinationLocation) const |
Blits this surface onto specified surface. | |
virtual void | displayAt (const OpenGL::GLTexture &texture, Coordinate x, Coordinate y) const |
Displays the specified texture at the specified location on that surface, supposed to be the screen surface, at natural size (i.e. | |
virtual void | displayWithAlphaAt (const OpenGL::GLTexture &texture, Coordinate x, Coordinate y, Pixels::FloatColorElement alpha) const |
Displays the specified texture at the specified location on that surface, supposed to be the screen surface, at natural size (i.e. | |
virtual void | displayCenteredHorizontallyAt (const OpenGL::GLTexture &texture, Coordinate y) const |
Displays the specified texture at specified ordinate, at original size, horizontally centered. | |
virtual void | displayCenteredHorizontallyAt (const OpenGL::GLTexture &texture, Coordinate xOffset, Coordinate y) const |
Displays the specified texture at specified ordinate and, horizontally, with a left and right border of width xOffset, scaling accordingly the texture. | |
virtual void | displayCenteredHorizontallyWithAlphaAt (const OpenGL::GLTexture &texture, Coordinate y, Pixels::FloatColorElement alpha) const |
Displays the specified texture at specified ordinate, at original size, horizontally centered, blended on the background based on specified alpha component.with . | |
virtual void | displayAtCenter (const OpenGL::GLTexture &texture) const |
Displays the specified texture at the center of that surface, supposed to be the screen surface, at natural size (i.e. | |
virtual void | displayAtCenterWithAlpha (const OpenGL::GLTexture &texture, Pixels::FloatColorElement alpha) const |
Displays the specified texture at the center of that surface, supposed to be the screen surface, at natural size (i.e. | |
virtual void | displayAtCenterWithFadeIn (const OpenGL::GLTexture &texture, Ceylan::System::Millisecond fadeInDuration=2000) |
Displays the specified texture at the center of that surface, supposed to be the screen surface, at natural size (i.e. | |
virtual void | displayAtCenterWithFadeOut (const OpenGL::GLTexture &texture, Ceylan::System::Millisecond fadeOutDuration=1000) |
Displays the specified texture at the center of that surface, supposed to be the screen surface, at natural size (i.e. | |
virtual void | displayInFullscreen (const OpenGL::GLTexture &texture) const |
Displays the specified texture in the full screen surface, possibly zooming (if the texture has a different size from the viewport) and distorting (if they have different width/height ratio. | |
virtual void | displayInFullscreenWithAlpha (const OpenGL::GLTexture &texture, Pixels::FloatColorElement alpha) const |
Displays the specified texture in the full screen surface, possibly zooming (if the texture has a different size from the viewport) and distorting (if they have different width/height ratio), blended on the background based on specified alpha component. | |
virtual void | displayInFullscreenSizeWithAlphaAt (const OpenGL::GLTexture &texture, Pixels::FloatColorElement alpha, Coordinate x, Coordinate y) const |
Displays the specified texture with a size corresponding to the full screen surface, possibly zooming (if the texture has a different size from the viewport) and distorting (if they have different width/height ratio), blended on the background based on specified alpha component, at specified onscreen location. | |
virtual Surface & | zoom (Ceylan::Maths::Real abscissaZoomFactor, Ceylan::Maths::Real ordinateZoomFactor, bool antialiasing=true) const |
Returns a newly created surface, obtained from this surface after a zoom of given factors. | |
virtual Surface & | rotoZoom (Ceylan::Maths::AngleInDegrees angle, Ceylan::Maths::Real zoomFactor, bool antialiasing=true) const |
Returns a newly created surface, obtained from this surface after a rotation of given angle and a zoom of given factor. | |
virtual Surface & | rotoZoom (Ceylan::Maths::AngleInDegrees angle, Ceylan::Maths::Real abscissaZoomFactor, Ceylan::Maths::Real ordinateZoomFactor, bool antialiasing=true) const |
Returns a newly created surface, obtained from this surface after a rotation of given angle and zooms of given factors. | |
virtual UprightRectangle & | getClippingArea () const |
Returns this surface's clipping area, expressed thanks to an UprightRectangle. | |
virtual void | setClippingArea (UprightRectangle &newClippingArea) |
Sets this surface's clipping area, expressed thanks to an UprightRectangle, whose ownership is left to the caller. | |
virtual UprightRectangle & | getContentArea () const |
Returns this surface's content area, expressed thanks to an UprightRectangle. | |
virtual void | loadImage (const std::string &filename, bool blitOnly=false, bool convertToDisplayFormat=true, bool convertWithAlpha=true) |
Loads an image, whose format will be auto-detected, from specified file, into this surface. | |
virtual void | loadJPG (const std::string &filename, bool blitOnly=false, bool convertToDisplayFormat=true, bool convertWithAlpha=true) |
Loads a JPEG image from specified file into this surface. | |
virtual void | loadPNG (const std::string &filename, bool blitOnly=false, bool convertToDisplayFormat=true, bool convertWithAlpha=true) |
Loads a PNG image from specified file into this surface. | |
virtual void | loadBMP (const std::string &filename, bool blitOnly=false, bool convertToDisplayFormat=true, bool convertWithAlpha=true) |
Loads a BMP image from specified file into this surface. | |
virtual void | loadGIF (const std::string &filename, bool blitOnly=false, bool convertToDisplayFormat=true, bool convertWithAlpha=true) |
Loads a GIF image from specified file into this surface. | |
virtual void | loadLBM (const std::string &filename, bool blitOnly=false, bool convertToDisplayFormat=true, bool convertWithAlpha=true) |
Loads a LBM image from specified file into this surface. | |
virtual void | loadPCX (const std::string &filename, bool blitOnly=false, bool convertToDisplayFormat=true, bool convertWithAlpha=true) |
Loads a PCX image from specified file into this surface. | |
virtual void | loadPNM (const std::string &filename, bool blitOnly=false, bool convertToDisplayFormat=true, bool convertWithAlpha=true) |
Loads a PNM image from specified file into this surface. | |
virtual void | loadTGA (const std::string &filename, bool blitOnly=false, bool convertToDisplayFormat=true, bool convertWithAlpha=true) |
Loads a TGA image from specified file into this surface. | |
virtual void | loadXPM (const std::string &filename, bool blitOnly=false, bool convertToDisplayFormat=true, bool convertWithAlpha=true) |
Loads a XPM image from specified file into this surface. | |
virtual void | savePNG (const std::string &filename, bool overwrite=true) |
Saves the current content of this surface into a PNG file. | |
virtual void | saveBMP (const std::string &filename, bool overwrite=true) |
Saves the current content of this surface into a BMP file. | |
virtual void | update () |
Updates the display with this surface, which will be automatically set in an up-to-date state if necessary, so that it is fully redrawn, including its widgets. | |
virtual UpdateCount | getUpdateCount () const |
Returns the current number of updates for that surface. | |
virtual void | updateRectangles (const std::list< UprightRectangle * > &listRects) |
Updates the part of this surface corresponding to the specified list of rectangles. | |
virtual void | updateRectangle (const UprightRectangle &rect) |
Updates the part of this surface corresponding to specified rectangle. | |
virtual void | updateRectangle (Coordinate x, Coordinate y, Length width, Length height) |
Updates the part of this surface corresponding to specified rectangle. | |
virtual bool | getRedrawState () const |
Returns the current need for redraw state. | |
virtual bool | isInternalSurfaceAvailable () const |
Tells whether the internal SDL surface is void or not. | |
virtual void | addWidget (TwoDimensional::Widget &widget) |
Registers specified widget to this surface, and put it at top level. | |
virtual void | putWidgetToFront (TwoDimensional::Widget &widget) |
Changes stacking inside this container surface so that specified widget is put to front. | |
virtual void | putWidgetToBack (TwoDimensional::Widget &widget) |
Changes stacking inside this container surface so that specified widget is put to back. | |
virtual void | centerMousePosition () |
Centers in the middle of the screen the position of the mouse cursor, by generating a mouse motion event. | |
virtual void | setMousePosition (Coordinate newX=0, Coordinate newY=0) |
Sets the position of the mouse cursor, by generating a mouse motion event. | |
virtual bool | mustBeLocked () const |
Tells whether this surface has to be locked before modifying it. | |
virtual Ceylan::System::Size | getSizeInMemory () const |
Returns the approximate size in memory, in bytes, currently taken by this object. | |
virtual bool | displayData (const Ceylan::Maths::IntegerData *dataArray, Ceylan::Uint32 dataCount, Pixels::ColorDefinition pencilColor, Pixels::ColorDefinition captionColor, Pixels::ColorDefinition backgroundColor, const std::string &caption="", const UprightRectangle *inBox=0) |
Displays specified set of data, defined by dataArray, an array of dataCount IntegerData elements, as a curve drawn with pencilColor, on a background whose color is backgroundColor. | |
virtual Point2D | getUpperLeftCorner () const |
Returns this UprightRectangle's upper left corner. | |
virtual void | setUpperLeftCorner (Point2D &newUpperLeftCorner) |
Sets this UprightRectangle's upper left corner, width and height do not change. | |
virtual Coordinate | getUpperLeftAbscissa () const |
Returns directly the abscissa of upper left corner. | |
virtual void | setUpperLeftAbscissa (Coordinate newAbscissa) |
Sets directly the abscissa of the upper left corner of this rectangle. | |
virtual Coordinate | getUpperLeftOrdinate () const |
Returns directly the ordinate of upper left corner. | |
virtual void | setUpperLeftOrdinate (Coordinate newOrdinate) |
Sets directly the ordinate of the upper left corner of this rectangle. | |
virtual Point2D | getLowerRightCorner () const |
Returns this UprightRectangle's lower right corner. | |
virtual void | setLowerRightCorner (Point2D &newLowerRightCorner) |
Sets directly the lower right corner of this rectangle. | |
virtual Coordinate | getLowerRightAbscissa () const |
Returns directly the abscissa of lower right corner. | |
virtual void | setLowerRightAbscissa (Coordinate newAbscissa) |
Sets directly the abscissa of the lower right corner of this rectangle. | |
virtual Coordinate | getLowerRightOrdinate () const |
Returns directly the ordinate of lower right corner. | |
virtual void | setLowerRightOrdinate (Coordinate newOrdinate) |
Sets directly the ordinate of the lower right corner of this rectangle. | |
virtual bool | draw (Surface &target, Pixels::ColorElement red, Pixels::ColorElement blue, Pixels::ColorElement green, Pixels::ColorElement alpha=Pixels::AlphaOpaque, bool filled=true) const |
Draws this UprightRectangle to specified surface with specified RGBA color. | |
virtual bool | draw (Surface &target, Pixels::ColorDefinition colorDef=Pixels::White, bool filled=true) const |
Draws this UprightRectangle to specified surface with specified RGBA color. | |
virtual bool | drawWithRoundedCorners (Surface &target, Length edgeWidth=3, Pixels::ColorDefinition edgeColorDef=Pixels::White, Pixels::ColorDefinition backgroundColorDef=Pixels::Transparent) const |
Draws this UprightRectangle to specified surface with rounded corners, drawn with specified color, above a background of specified color. | |
virtual Length | computeRadiusForRoundRectangle (Length edgeWidth) const |
Computes the preferred radius of round corners for this rectangle, with the specified edge width. | |
virtual LowLevelRect * | toLowLevelRect () const |
Static Public Member Functions | |
static Pixels::ColorDefinition | GetEdgeColor () |
Returns the current default edge color for all new widgets. | |
static void | SetEdgeColor (Pixels::ColorDefinition edgeColorDef) |
Sets the edge color for all new widgets. | |
static Surface & | LoadImage (const std::string &filename, bool convertToDisplayFormat=true, bool convertWithAlpha=true) |
Surface factory: creates a new Surface instance from specified image file. | |
static Surface & | LoadPNG (const std::string &filename, bool convertToDisplayFormat=true, bool convertWithAlpha=true) |
Surface factory: creates a new Surface instance from specified PNG image file. | |
static Surface & | LoadJPG (const std::string &filename, bool convertToDisplayFormat=true, bool convertWithAlpha=true) |
Surface factory: creates a new Surface instance from specified JPG image file. | |
static std::string | InterpretFlags (Ceylan::Flags flags) |
Outputs a textual description of the given surface flags. | |
Static Public Attributes | |
static const Length | DefaultEdgeWidth = 3 |
The default edge width for the 'RoundCorners' shape: | |
static const Ceylan::Flags | Software = 0x00000000 |
Indicates that a surface is to be stored in system memory. | |
static const Ceylan::Flags | Hardware = 0x00000001 |
Indicates that a surface is to be stored in video memory. | |
static const Ceylan::Flags | AsynchronousBlit = 0x00000004 |
Indicates that a surface should use asynchronous blits if possible. | |
static const Ceylan::Flags | ExclusivePalette = 0x20000000 |
Indicates that a surface should have an exclusive palette. | |
static const Ceylan::Flags | HardwareAcceleratedBlit = 0x00000100 |
Indicates that a surface is to use hardware-accelerated blits. | |
static const Ceylan::Flags | ColorkeyBlit = 0x00001000 |
Indicates that a surface is to use colorkey blits. | |
static const Ceylan::Flags | RLEColorkeyBlit = 0x00004000 |
Indicates that a surface is to use RLE-accelerated colorkey blits. | |
static const Ceylan::Flags | AlphaBlendingBlit = 0x00010000 |
Indicates that a surface is to use alpha blending blits. | |
static const Ceylan::Flags | Preallocated = 0x01000000 |
Indicates that a surface is to use preallocated memory. | |
static const Ceylan::Flags | RLEColorkeyBlitAvailable = 0x00002000 |
Indicates that RLE colorkey blit is actually accelerated (read-only). | |
static const Ceylan::Flags | AnyPixelFormat = 0x10000000 |
Indicates that a display surface may use any pixel format. | |
static const Ceylan::Flags | DoubleBuffered = 0x40000000 |
Indicates that a display surface is to be double buffered. | |
static const Ceylan::Flags | FullScreen = 0x80000000 |
Indicates that a display surface is to be full screen, not windowed. | |
static const Ceylan::Flags | OpenGL = 0x00000002 |
Indicates that a display surface should have an OpenGL context. | |
static const Ceylan::Flags | Resizable = 0x00000010 |
Indicates that a display surface is to be resizable. | |
static const Length | graphAbscissaOffset = 10 |
Offset used when drawing curve in a container. | |
static const Length | graphOrdinateOffset = 15 |
Offset used when drawing curve in a container. | |
static const Length | captionAbscissaOffset = 5 |
Offset used when printing caption in a container. | |
static const Length | captionOrdinateOffset = 10 |
Offset used when printing caption in a container. | |
Protected Types | |
typedef Ceylan::Sint16 | Offset |
Offset of a Surface. | |
Protected Member Functions | |
virtual void | updateClientArea () |
Updates client area with regard to current shape and decoration status. | |
virtual void | setBackBufferRedrawState (bool needsToBeRedrawn) |
Sets the need for redraw state for the back-buffer. | |
virtual bool | getBackBufferRedrawState () const |
Returns the current need for redraw state for the back-buffer. | |
virtual void | updateDecorationFlag () |
Updates the decoration flag, depending on the various services requested. | |
virtual Surface & | getContainer () |
Returns this widget's container surface. | |
virtual const Surface & | getConstContainer () const |
Returns this widget's container surface as a 'const' object. | |
virtual void | drawFundamentals (Surface &targetSurface) |
Draws the fundamental parts of a widget: widget area cleaned accordingly to the current base color mode, and edges are drawn. | |
virtual bool | isDecorated () const |
Tells whether this widget is decorated. | |
virtual void | drawDecorations (Surface &targetSurface) |
Draws the decorations for this widget to specified surface. | |
virtual void | preUnlock () |
Effective unlocking of the surface. | |
virtual void | postLock () |
Effective locking of the surface. | |
Offset | getOffset () const |
Returns this surface's offset. | |
void | setOffset (Offset offset) |
Sets this surface's offset. | |
virtual void | flush () |
Releases internal SDL surface. | |
virtual void | inconsistencyDetected (const std::string &message) const |
Triggered when an abnormal inconsistency is detected between OSDL's surface state and its back-end counterpart. | |
Protected Attributes | |
Length | _minimumHeight |
Tells whether the height of this widget should be smallest possible one. | |
Length | _maximumHeight |
The upper bound of the height of this widget. | |
Shape | _shape |
Records the shape of this text widget. | |
Pixels::ColorDefinition | _textColor |
The color of rendered text in this widget. | |
Pixels::ColorDefinition | _edgeColor |
The color of the edges of this text widget. | |
Pixels::ColorDefinition | _backColorForRoundCorners |
The background color, only for RoundCorners shape, since the basecolor is already used for the colorkey. | |
Length | _roundOffset |
Precomputation of the round offset associated with round corners. | |
std::string | _text |
The text which is to be displayed by this widget. | |
Text::Font * | _font |
The font which is to be used for text rendering. | |
bool | _verticallyAligned |
Tells whether the text should be vertically aligned. | |
bool | _justified |
Tells whether the text should be justified. | |
Text::Font::RenderQuality | _quality |
Quality of text rendering. | |
Text::TextIndex | _currentIndex |
The current index of text that could not fit in the last display, or zero if no text has been rendered yet. | |
Surface * | _overallSurface |
The overall surface where this widget (thanks to the back-buffer) and all its sub-widget tree will be rendered. | |
Point2D | _upperLeftCorner |
This widget's upper left corner, relatively to its container. | |
UprightRectangle | _clientArea |
The rectangular client area, defined in the referential of this widget. | |
bool | _decorated |
Tells whether this widget rendering should include decorations. | |
std::string | _title |
This Widget's title. | |
bool | _minMaximizable |
Tells whether this widget can be minimized and maximized by the user. | |
bool | _draggable |
Tells whether this widget can be dragged by the user. | |
bool | _wrappable |
Tells whether this widget can be wrapped by the user, hiding the whole widget but its decoration. | |
bool | _closable |
Tells whether this widget can be closed by the user. | |
bool | _hasFocus |
Tells whether this widget has currently the focus (i.e. | |
BaseColorMode | _baseColorMode |
Tells whether a background color, color-keying or nothing special shall be used for this widget. | |
Pixels::ColorDefinition | _baseColor |
Stores the base color of this widget, which is either used as a background color or a colorkey, depending on '_baseColorMode'. | |
Pixels::PixelColor | _actualBaseColor |
The base color, converted to this widget current pixel format, inherited from container. | |
LowLevelSurface * | _surface |
This internal structure also contains private fields not used here. | |
DisplayType | _displayType |
Tells what is the display type of this surface. | |
bool | _mustBeLocked |
Tells whether this surface must be locked before modifying it. | |
UpdateCount | _updateCount |
Counts the number of updates for this surface. | |
Coordinate | _x |
Upper left corner's abscissa (horizontal coordinate). | |
Coordinate | _y |
Upper left corner's ordinate (vertical coordinate). | |
Static Protected Attributes | |
static const Length | _TextWidthOffset = 4 |
Horizontal offset on both sides. | |
static const Length | _TextHeightOffset = 4 |
Vertical offset on both sides. | |
static Pixels::ColorDefinition | _EdgeColor = Pixels::Grey |
Color of widget edges. | |
static Pixels::ColorDefinition | _TitleColor = Pixels::Black |
Color of widget title. | |
static Text::HorizontalAlignment | _TitleHorizontalAlignment = Text::WidthCentered |
Defines how a widget title should be horizontally aligned (default: Center). | |
static Text::VerticalAlignment | _TitleVerticalAlignment = Text::HeightCentered |
Defines how a widget title should be vertically aligned. | |
static Length | _ClientOffsetWidth = 2 |
Default width offset for client area relative to widget vertical edges. | |
static Length | _ClientOffsetHeight = 1 |
Default height offset for client area relative to widget horizontal edges. | |
static Coordinate | _TitleOffsetAbscissa = 5 |
Default abscissa offset relative to widget upper left corner used to print widget title with left alignment. | |
static Coordinate | _TitleOffsetOrdinate = 5 |
Default ordinate offset relative to widget upper left corner used to print widget title. | |
static Coordinate | _TitleBarOffsetOrdinate = 15 |
Default ordinate offset relative to widget upper left corner used to draw widget title bar. | |
static std::string | _DefaultTitle = "(anonymous widget)" |
Default title to be used when a titleless widget has however to be rendered decorated. | |
Private Member Functions | |
TextWidget (const TextWidget &source) | |
Copy constructor made private to ensure that it will never be called. | |
TextWidget & | operator= (const TextWidget &source) |
Assignment operator made private to ensure that it will never be called. |
Text widgets are back-buffered widget which display full texts, i.e.
sets of paragraphs.
Many attributes of the text (ex: text color) are determined from the provided font.
Definition at line 73 of file OSDLTextWidget.h.
typedef Ceylan::Sint16 OSDL::Video::Surface::Offset [protected, inherited] |
Offset of a Surface.
Definition at line 3743 of file OSDLSurface.h.
enum OSDL::Video::TwoDimensional::Widget::BaseColorMode [inherited] |
Describes the available modes for handling the base color of a widget.
Hence the base color can be the background color of a widget ('BackgroundColor'), or the color key to be used if automatic color-keying is activated ('Colorkey'). The base color can be ignored thanks to 'None'.
The 'NotInitialized' value is only to be used in constructors.
Definition at line 179 of file OSDLWidget.h.
enum OSDL::Video::Surface::DisplayType [inherited] |
Describes the display type of a surface:
Definition at line 277 of file OSDLSurface.h.
Describes the shape of a text container:
Definition at line 88 of file OSDLTextWidget.h.
TextWidget::TextWidget | ( | Surface & | container, | |
const Point2D & | relativePosition, | |||
Length | width, | |||
Length | maximumHeight, | |||
Shape | shape, | |||
Pixels::ColorDefinition | textColor, | |||
Pixels::ColorDefinition | edgeColor, | |||
Pixels::ColorDefinition | backgroundColor, | |||
const std::string & | text, | |||
Text::Font & | font, | |||
bool | minimumHeight = true , |
|||
bool | verticallyAligned = true , |
|||
bool | justified = true , |
|||
Text::Font::RenderQuality | quality = Text::Font::Blended , |
|||
const std::string & | title = "" , |
|||
bool | minMaximizable = false , |
|||
bool | draggable = false , |
|||
bool | wrappable = false , |
|||
bool | closable = false | |||
) |
Creates a back-buffered widget whose role is to display text.
Its container, which is always a surface (since Widgets are themselves specialized surfaces) will own this widget, therefore will deallocate it when appropriate.
Most of the widget attributes, such as bits per pixel, will be deduced from the corresponding attributes of its container.
container | this Widget's container surface, to which it will automatically be subscribed to, as an EventListener for redraw operations. | |
relativePosition | tells where the upper-left corner of the widget is located inside its container. | |
width | this widget's width, in pixels. | |
maximumHeight | this widget's height, in pixels. The widget can never have a bigger height, but if 'minimumHeight' is true, it may be smaller. | |
shape | the desired shape of the text container. If implies the choice of base color mode. | |
textColor | is the color of the text to be rendered in this widget. | |
edgeColor | is the color of the container edges. It is the only edge color used, and Widget::EdgeColor is not impacted for other types of widgets. | |
backgroundColor | is the color of the background behind the text. | |
title | the title which may be drawn, if non empty, on the top of the widget. | |
minMaximizable | tells whether the widget can be minimized or maximized by the user. | |
text | the text which is to be rendered in this widget. | |
font | the font that should be used. It will be used by this widget but not owned, hence the font will not be deleted when this widget will be deleted. | |
minimumHeight | tells whether, if the rendered text takes less than than the full provided height, this widget should have an height just big enough to contain the text (if true), or if the user-provided height should be kept, hence creating a widget whose last pixel rows are empty (if false). In all cases the actual height will be no bigger than the provided 'maximumHeight'. | |
verticallyAligned | tells whether the text should be vertically aligned. Even if set to false, if the text uses all the container final height it could use, then the text will be nonetheless vertically aligned to avoid the false feeling of having enough room for one more line. | |
justified | tells whether text should be justified in the client area of this widget. | |
quality | the chosen quality for text rendering. | |
title | the title which may be drawn, if non empty, on the top of the widget. | |
minMaximizable | tells whether the widget can be minimized or maximized by the user. | |
draggable | tells whether the widget can be dragged by the user. | |
wrappable | tells whether the widget can be wrapped (only the widget decoration is displayed) by the user. | |
closable | tells whether the widget can be closed by the user. |
VideoException | if an error occured. |
The stack level used to be inaccurately modeled as a third coordinate (depth), instead of which it is managed thanks to an ordered list in the parent container.
Definition at line 56 of file OSDLTextWidget.cc.
References _backColorForRoundCorners, _edgeColor, _shape, _textColor, OSDL::Video::TwoDimensional::Widget::BackgroundColor, OSDL::Video::TwoDimensional::Widget::Colorkey, RoundCorners, OSDL::Video::Pixels::selectColorDifferentFrom(), OSDL::Video::TwoDimensional::BackBufferedWidget::setBaseColorMode(), SquareCorners, and updateClientArea().
TextWidget::~TextWidget | ( | ) | throw () [virtual] |
Basic virtual destructor.
Definition at line 150 of file OSDLTextWidget.cc.
OSDL::Video::TwoDimensional::TextWidget::TextWidget | ( | const TextWidget & | source | ) | [explicit, private] |
Copy constructor made private to ensure that it will never be called.
The compiler should complain whenever this undefined constructor is called, implicitly or not.
void Surface::addWidget | ( | TwoDimensional::Widget & | widget | ) | [virtual, inherited] |
Registers specified widget to this surface, and put it at top level.
Definition at line 3408 of file OSDLSurface.cc.
References OSDL::Video::TwoDimensional::Widget::toString().
void Widget::beNotifiedOf | ( | const Ceylan::Event & | newEvent | ) | [virtual, inherited] |
Notifies this widget of a new event whose source is its container.
Definition at line 356 of file OSDLWidget.cc.
References OSDL::Video::TwoDimensional::Widget::redraw().
bool Surface::blitTo | ( | Surface & | targetSurface, | |
const TwoDimensional::UprightRectangle & | sourceRectangle, | |||
const TwoDimensional::Point2D & | destinationLocation | |||
) | const [virtual, inherited] |
Blits this surface onto specified surface.
targetSurface | the destination surface this surface will be blitted to. | |
sourceRectangle | a clipping rectangle defining which part of this surface is to be blitted. | |
destinationLocation | the point of the destination surface where this surface will be blitted. |
VideoMemoryLostException | if either of the surfaces were in video memory, and if the video memory was lost: it then should be reloaded with content and re-blitted. |
Definition at line 2033 of file OSDLSurface.cc.
References OSDL::Utils::getBackendLastError(), OSDL::Video::Surface::getSDLSurface(), OSDL::Video::TwoDimensional::Point2D::getX(), OSDL::Video::TwoDimensional::Point2D::getY(), OSDL::Video::TwoDimensional::UprightRectangle::toLowLevelRect(), OSDL::Video::TwoDimensional::Point2D::toString(), and OSDL::Video::TwoDimensional::UprightRectangle::toString().
bool Surface::blitTo | ( | Surface & | targetSurface, | |
const TwoDimensional::Point2D & | location | |||
) | const [virtual, inherited] |
Blits this surface onto specified surface.
targetSurface | the destination surface this surface will be blitted to. | |
location | the point of the destination surface where this surface will be blitted. |
VideoMemoryLostException | if either of the surfaces was in video memory, and if the video memory was lost: it then should be reloaded with content and re-blitted. Otherwise, if blit went wrong differently, throw a commented VideoException. |
Definition at line 2023 of file OSDLSurface.cc.
References OSDL::Video::Surface::blitTo(), OSDL::Video::TwoDimensional::Point2D::getX(), and OSDL::Video::TwoDimensional::Point2D::getY().
bool Surface::blitTo | ( | Surface & | targetSurface, | |
Coordinate | x, | |||
Coordinate | y | |||
) | const [virtual, inherited] |
Blits this surface onto specified surface.
Blits from a RGBA Surface with AlphaBlendingBlit set to another RGBA surface will keep the alpha of the destination surface. This means that you cannot compose two arbitrary RGBA surfaces this way and get the result you would expect from "overlaying" them: the destination alpha will work as a mask. Hence one might set the alpha of the destination surface to targeted value before the blit.
targetSurface | the destination surface this surface will be blitted to. | |
x | abscissa of the destination surface where this surface will be blitted. | |
y | ordinate of the destination surface where this surface will be blitted |
VideoMemoryLostException | if either of the surfaces were in video memory, and if the video memory was lost: it then should be reloaded with content and re-blitted. Otherwise, if blit went wrong differently, throw a commented VideoException. |
Definition at line 1952 of file OSDLSurface.cc.
References OSDL::Utils::getBackendLastError(), OSDL::Video::Surface::getSDLSurface(), and OSDL::Video::Pixels::toString().
bool Surface::blitTo | ( | Surface & | targetSurface | ) | const [virtual, inherited] |
Blits this surface onto specified surface.
Blits from a RGBA Surface with AlphaBlendingBlit set to another RGBA surface will keep the alpha of the destination surface. This means that you cannot compose two arbitrary RGBA surfaces this way and get the result you would expect from "overlaying" them: the destination alpha will work as a mask. Hence one might set the alpha of the destination surface to targeted value before the blit.
targetSurface | the destination surface this surface will be blitted to, starting at [0;0] in the destination surface: both upper left corners will correspond. |
VideoMemoryLostException | if either of the surfaces was in video memory, and if the video memory was lost: it then should be reloaded with content and re-blitted. Otherwise, if blit went wrong differently, throw a commented VideoException. |
Definition at line 1943 of file OSDLSurface.cc.
Referenced by OSDL::Video::TwoDimensional::Text::TrueTypeFont::blitLatin1Glyph(), OSDL::Video::TwoDimensional::Text::Font::blitLatin1MultiLineText(), OSDL::Video::TwoDimensional::Text::Font::blitLatin1Text(), OSDL::Video::TwoDimensional::Text::Font::blitLatin1Word(), OSDL::Video::Surface::blitTo(), OSDL::Video::TwoDimensional::drawDiscWithEdge(), OSDL::Video::TwoDimensional::UprightRectangle::drawWithRoundedCorners(), OSDL::Video::TwoDimensional::Widget::redraw(), OSDL::Video::TwoDimensional::BackBufferedWidget::redraw(), redrawBackBuffer(), OSDL::Video::TwoDimensional::BackBufferedWidget::redrawInternal(), OSDL::Video::TwoDimensional::Text::Font::renderLatin1MultiLineText(), OSDL::Video::TwoDimensional::Text::Font::renderLatin1TextWithWordCached(), OSDL::Video::Surface::resize(), and OSDL::Video::OpenGL::GLTexture::setUpInternalSurfaceFrom().
void Surface::centerMousePosition | ( | ) | [virtual, inherited] |
Centers in the middle of the screen the position of the mouse cursor, by generating a mouse motion event.
Definition at line 3489 of file OSDLSurface.cc.
References OSDL::Video::Surface::getHeight(), OSDL::Video::Surface::getWidth(), and OSDL::Video::Surface::setMousePosition().
bool Widget::clean | ( | ) | [virtual, inherited] |
Cleans the widget by blanking it with a background color, or a colorkey, or does nothing, depending on base color mode being respectively BackgroundColor, or Colorkey, or None.
Definition at line 319 of file OSDLWidget.cc.
References OSDL::Video::TwoDimensional::Widget::_baseColor, OSDL::Video::TwoDimensional::Widget::_baseColorMode, OSDL::Video::TwoDimensional::Widget::BackgroundColor, OSDL::Video::TwoDimensional::Widget::Colorkey, OSDL::Video::Surface::fill(), OSDL::Video::TwoDimensional::Widget::None, and OSDL::Video::TwoDimensional::Widget::NotInitialized.
Referenced by OSDL::Video::TwoDimensional::Widget::drawFundamentals().
bool Surface::clear | ( | ) | [virtual, inherited] |
Clears this surface, which may be the screen surface.
This method clears the viewport for OpenGL surfaces (both the color buffer and the depth buffer), otherwise performs a mere 'fill' with pure black.
VideoException | if the operation failed. |
Definition at line 967 of file OSDLSurface.cc.
References OSDL::Video::Surface::_displayType, OSDL::Video::Pixels::Black, OSDL::Video::Surface::fill(), and OSDL::Video::Surface::OpenGLScreenSurface.
Referenced by OSDL::Video::Surface::displayAtCenterWithFadeIn(), and OSDL::Video::Surface::displayAtCenterWithFadeOut().
Clonable & Surface::clone | ( | ) | const [virtual, inherited] |
Clones this Surface: creates a new Surface, exact copy of this Surface, but with no data shared with it at all.
The display type of the clone will be back-buffer.
VideoException | on failure, such as the impossibility of creating the new surface, or to blit the former one. |
Definition at line 460 of file OSDLSurface.cc.
References OSDL::Video::Surface::_surface, OSDL::Video::Surface::BackBuffer, OSDL::Utils::getBackendLastError(), OSDL::Video::Surface::getBitsPerPixel(), OSDL::Video::Pixels::getCurrentColorMasks(), OSDL::Video::Surface::getFlags(), OSDL::Video::Surface::getHeight(), OSDL::Video::Surface::getPixelFormat(), OSDL::Video::Surface::getWidth(), OSDL::Video::Surface::Surface(), and OSDL::Video::Pixels::toString().
Length UprightRectangle::computeRadiusForRoundRectangle | ( | Length | edgeWidth | ) | const [virtual, inherited] |
Computes the preferred radius of round corners for this rectangle, with the specified edge width.
edgeWidth | the edge width to take into account for the radius. |
VideoException | if no radius can fullfill the set of constraints due to this rectangle and the edge width. |
Definition at line 770 of file OSDLUprightRectangle.cc.
References OSDL::Video::TwoDimensional::UprightRectangle::getHeight(), OSDL::Video::TwoDimensional::UprightRectangle::getWidth(), OSDL::Video::TwoDimensional::UprightRectangle::toString(), and OSDL::Video::Pixels::toString().
Referenced by OSDL::Video::TwoDimensional::UprightRectangle::drawWithRoundedCorners(), and updateClientArea().
void Surface::convertFromColorKeyToAlphaChannel | ( | ) | [virtual, inherited] |
Converts this surface, which must use a color key, so that it uses an alpha channel instead.
This method uses 'convertToDisplay'.
VideoException | if no internal surface is available, if it does not use color key, if the conversion failed or if there is not enough memory. |
Definition at line 758 of file OSDLSurface.cc.
References OSDL::Video::Surface::ColorkeyBlit, OSDL::Video::Surface::convertToDisplay(), OSDL::Video::Surface::getFlags(), and OSDL::Video::Surface::toString().
void Surface::convertToDisplay | ( | bool | alphaChannelWanted = true |
) | [virtual, inherited] |
Converts the internal surface to the pixel format of the display, so that any blit of this surface to the screen is quicker.
The backend must already be initialized.
alphaChannelWanted | tells whether this converted surface should have an alpha channel after this call. |
This method can be used to convert a colorkey to an alpha channel, if the ColorkeyBlit flag is already set on this surface and if alphaChannelWanted is true. The generated surface will then be transparent (alpha=AlphaTransparent) where the pixels match the colorkey, and opaque (alpha=AlphaOpaque) elsewhere.
VideoException | if no internal surface is available, if the conversion failed or if there is not enough memory. |
Definition at line 613 of file OSDLSurface.cc.
References OSDL::Video::Surface::_surface.
Referenced by OSDL::Video::TwoDimensional::BackBufferedWidget::BackBufferedWidget(), OSDL::Video::TwoDimensional::Text::FixedFont::basicRenderLatin1Glyph(), OSDL::Video::TwoDimensional::Text::Font::basicRenderLatin1Text(), OSDL::Video::TwoDimensional::Text::TrueTypeFont::basicRenderUnicodeGlyph(), OSDL::Video::Surface::convertFromColorKeyToAlphaChannel(), OSDL::Video::TwoDimensional::Text::Font::renderLatin1MultiLineText(), OSDL::Video::TwoDimensional::Text::TrueTypeFont::renderLatin1Text(), OSDL::Video::TwoDimensional::Text::Font::renderLatin1TextWithWordCached(), OSDL::Video::TwoDimensional::Text::TrueTypeFont::renderUnicodeText(), OSDL::Video::TwoDimensional::Text::TrueTypeFont::renderUTF8Text(), and OSDL::Video::TwoDimensional::Widget::Widget().
Surface & Surface::createColorReducedSurfaceFor | ( | const Palette & | palette, | |
bool | manageColorkey = true | |||
) | const [inherited] |
Returns a newly created 8-bit (indexed) color surface, whose pixels have been chosen in the specified palette to match best with the pixel of the surface the method has been called on.
palette | the target palette for the color reduction. | |
manageColorkey | tells whether a colorkey should be taken care of: if true, an attempt to guess the colorkey of this surface will be performed. If it succeeds then during color-reduction this guessed colorkey will be matched with the supposedly declared palette colorkey, no matter how different there colors are. This way colorkey information is kept existing and separated from the other colors. |
VideoException | if the operation failed, included if manageColorkey is true but no colorkey could be guessed or if it is guessed but there is no colorkey registered in target palette. |
Definition at line 849 of file OSDLSurface.cc.
References OSDL::Video::Pixels::AlphaOpaque, OSDL::Video::Pixels::areEqual(), OSDL::Video::Pixels::convertPixelColorToColorDefinition(), OSDL::Video::Palette::getClosestColorIndexTo(), OSDL::Video::Palette::getColorKeyIndex(), OSDL::Video::Surface::getHeight(), OSDL::Video::Surface::getPixelColorAt(), OSDL::Video::Surface::getPixelFormat(), OSDL::Video::Surface::getWidth(), OSDL::Video::Surface::guessColorKey(), OSDL::Video::Surface::putPixelColorAt(), OSDL::Video::Surface::setPalette(), OSDL::Video::Surface::Software, and OSDL::Video::Surface::Surface().
string Surface::describePixelAt | ( | Coordinate | x, | |
Coordinate | y | |||
) | [virtual, inherited] |
Returns a textual description of the pixel of this surface located at [x;y].
x | the abscissa of the pixel. | |
y | the ordinate of the pixel. |
Definition at line 1100 of file OSDLSurface.cc.
References OSDL::Video::Surface::getPixelColorAt(), OSDL::Video::Surface::getPixelFormat(), and OSDL::Video::Surface::toString().
Referenced by OSDL::Video::TwoDimensional::drawCircle(), OSDL::Video::TwoDimensional::drawDiscWithEdge(), and OSDL::Video::TwoDimensional::UprightRectangle::drawWithRoundedCorners().
void Surface::displayAt | ( | const OpenGL::GLTexture & | texture, | |
Coordinate | x, | |||
Coordinate | y | |||
) | const [virtual, inherited] |
Displays the specified texture at the specified location on that surface, supposed to be the screen surface, at natural size (i.e.
one pixel of the texture corresponds exactly to one pixel on the screen).
texture | the texture to map. | |
x | the abscissa screen coordinate. | |
y | the ordinate screen coordinate. |
VideoException | if the operation failed. |
Definition at line 2104 of file OSDLSurface.cc.
References OSDL::Video::OpenGL::GLTexture::getHeight(), OSDL::Video::OpenGL::GLTexture::getWidth(), and OSDL::Video::OpenGL::GLTexture::setAsCurrent().
void Surface::displayAtCenter | ( | const OpenGL::GLTexture & | texture | ) | const [virtual, inherited] |
Displays the specified texture at the center of that surface, supposed to be the screen surface, at natural size (i.e.
one pixel of the texture corresponds exactly to one pixel on the screen).
texture | the texture to map. |
VideoException | if the operation failed. |
Definition at line 2358 of file OSDLSurface.cc.
References OSDL::Video::OpenGL::GLTexture::getHeight(), OSDL::Video::Surface::getHeight(), OSDL::Video::OpenGL::GLTexture::getWidth(), OSDL::Video::Surface::getWidth(), and OSDL::Video::OpenGL::GLTexture::setAsCurrent().
void Surface::displayAtCenterWithAlpha | ( | const OpenGL::GLTexture & | texture, | |
Pixels::FloatColorElement | alpha | |||
) | const [virtual, inherited] |
Displays the specified texture at the center of that surface, supposed to be the screen surface, at natural size (i.e.
one pixel of the texture corresponds exactly to one pixel on the screen), blended on the background based on specified alpha component.
Useful to perform fade-in/fade-out.
texture | the texture to map. | |
alpha | a floating-point value in [0,1], from invisible to solid. |
VideoException | if the operation failed. |
Definition at line 2408 of file OSDLSurface.cc.
References OSDL::Video::OpenGL::GLTexture::getHeight(), OSDL::Video::Surface::getHeight(), OSDL::Video::OpenGL::GLTexture::getWidth(), OSDL::Video::Surface::getWidth(), and OSDL::Video::OpenGL::GLTexture::setAsCurrent().
void Surface::displayAtCenterWithFadeIn | ( | const OpenGL::GLTexture & | texture, | |
Ceylan::System::Millisecond | fadeInDuration = 2000 | |||
) | [virtual, inherited] |
Displays the specified texture at the center of that surface, supposed to be the screen surface, at natural size (i.e.
one pixel of the texture corresponds exactly to one pixel on the screen), with a fade-in of specified duration.
texture | the texture to map. | |
fadeInDuration | the number of milliseconds the fade-in should last. |
VideoException | if the operation failed. |
Definition at line 2464 of file OSDLSurface.cc.
References OSDL::Video::Surface::clear(), OSDL::Video::OpenGL::GLTexture::getHeight(), OSDL::Video::Surface::getHeight(), OSDL::Video::OpenGL::GLTexture::getWidth(), OSDL::Video::Surface::getWidth(), OSDL::Video::OpenGL::GLTexture::setAsCurrent(), and OSDL::Video::Surface::update().
void Surface::displayAtCenterWithFadeOut | ( | const OpenGL::GLTexture & | texture, | |
Ceylan::System::Millisecond | fadeOutDuration = 1000 | |||
) | [virtual, inherited] |
Displays the specified texture at the center of that surface, supposed to be the screen surface, at natural size (i.e.
one pixel of the texture corresponds exactly to one pixel on the screen), with a fade-out of specified duration.
texture | the texture to map. | |
fadeOutDuration | the number of milliseconds the fade-out should last. |
VideoException | if the operation failed. |
Definition at line 2557 of file OSDLSurface.cc.
References OSDL::Video::Surface::clear(), OSDL::Video::OpenGL::GLTexture::getHeight(), OSDL::Video::Surface::getHeight(), OSDL::Video::OpenGL::GLTexture::getWidth(), OSDL::Video::Surface::getWidth(), OSDL::Video::OpenGL::GLTexture::setAsCurrent(), and OSDL::Video::Surface::update().
void Surface::displayCenteredHorizontallyAt | ( | const OpenGL::GLTexture & | texture, | |
Coordinate | xOffset, | |||
Coordinate | y | |||
) | const [virtual, inherited] |
Displays the specified texture at specified ordinate and, horizontally, with a left and right border of width xOffset, scaling accordingly the texture.
texture | the texture to map. | |
xOffset | the first abscissa at which the texture should be horizontally displayed at. | |
y | the ordinate the texture will be displayed at. |
VideoException | if the operation failed. |
Definition at line 2305 of file OSDLSurface.cc.
References OSDL::Video::OpenGL::GLTexture::getHeight(), OSDL::Video::Surface::getWidth(), and OSDL::Video::OpenGL::GLTexture::setAsCurrent().
void Surface::displayCenteredHorizontallyAt | ( | const OpenGL::GLTexture & | texture, | |
Coordinate | y | |||
) | const [virtual, inherited] |
Displays the specified texture at specified ordinate, at original size, horizontally centered.
texture | the texture to map. | |
y | the ordinate the texture will be displayed from (i.e. the top ordinate). |
VideoException | if the operation failed. |
Definition at line 2194 of file OSDLSurface.cc.
References OSDL::Video::OpenGL::GLTexture::getHeight(), OSDL::Video::OpenGL::GLTexture::getWidth(), OSDL::Video::Surface::getWidth(), and OSDL::Video::OpenGL::GLTexture::setAsCurrent().
void Surface::displayCenteredHorizontallyWithAlphaAt | ( | const OpenGL::GLTexture & | texture, | |
Coordinate | y, | |||
Pixels::FloatColorElement | alpha | |||
) | const [virtual, inherited] |
Displays the specified texture at specified ordinate, at original size, horizontally centered, blended on the background based on specified alpha component.with .
texture | the texture to map. | |
y | the ordinate the texture will be displayed at. | |
alpha | a floating-point value in [0,1], from invisible to solid. |
VideoException | if the operation failed. |
Definition at line 2246 of file OSDLSurface.cc.
References OSDL::Video::OpenGL::GLTexture::getHeight(), OSDL::Video::OpenGL::GLTexture::getWidth(), OSDL::Video::Surface::getWidth(), and OSDL::Video::OpenGL::GLTexture::setAsCurrent().
virtual bool OSDL::Video::Surface::displayData | ( | const Ceylan::Maths::IntegerData * | dataArray, | |
Ceylan::Uint32 | dataCount, | |||
Pixels::ColorDefinition | pencilColor, | |||
Pixels::ColorDefinition | captionColor, | |||
Pixels::ColorDefinition | backgroundColor, | |||
const std::string & | caption = "" , |
|||
const UprightRectangle * | inBox = 0 | |||
) | [virtual, inherited] |
Displays specified set of data, defined by dataArray, an array of dataCount IntegerData elements, as a curve drawn with pencilColor, on a background whose color is backgroundColor.
The whole display will be scaled vertically to fit into inBox. On the contrary, the abscissa will be used as is.
void Surface::displayInFullscreen | ( | const OpenGL::GLTexture & | texture | ) | const [virtual, inherited] |
Displays the specified texture in the full screen surface, possibly zooming (if the texture has a different size from the viewport) and distorting (if they have different width/height ratio.
texture | the texture to map. |
VideoException | if the operation failed. |
Definition at line 2651 of file OSDLSurface.cc.
References OSDL::Video::Surface::getHeight(), OSDL::Video::Surface::getWidth(), and OSDL::Video::OpenGL::GLTexture::setAsCurrent().
void Surface::displayInFullscreenSizeWithAlphaAt | ( | const OpenGL::GLTexture & | texture, | |
Pixels::FloatColorElement | alpha, | |||
Coordinate | x, | |||
Coordinate | y | |||
) | const [virtual, inherited] |
Displays the specified texture with a size corresponding to the full screen surface, possibly zooming (if the texture has a different size from the viewport) and distorting (if they have different width/height ratio), blended on the background based on specified alpha component, at specified onscreen location.
texture | the texture to map. | |
x | the abscissa screen coordinate. | |
y | the ordinate screen coordinate. | |
alpha | a floating-point value in [0,1], from invisible to solid. |
VideoException | if the operation failed. |
Definition at line 2758 of file OSDLSurface.cc.
References OSDL::Video::Surface::getHeight(), OSDL::Video::Surface::getWidth(), and OSDL::Video::OpenGL::GLTexture::setAsCurrent().
void Surface::displayInFullscreenWithAlpha | ( | const OpenGL::GLTexture & | texture, | |
Pixels::FloatColorElement | alpha | |||
) | const [virtual, inherited] |
Displays the specified texture in the full screen surface, possibly zooming (if the texture has a different size from the viewport) and distorting (if they have different width/height ratio), blended on the background based on specified alpha component.
Useful to perform fade-in/fade-out. with the specified alphablending.
texture | the texture to map. | |
alpha | a floating-point value in [0,1], from invisible to solid. |
VideoException | if the operation failed. |
Definition at line 2701 of file OSDLSurface.cc.
References OSDL::Video::Surface::getHeight(), OSDL::Video::Surface::getWidth(), and OSDL::Video::OpenGL::GLTexture::setAsCurrent().
void Surface::displayWithAlphaAt | ( | const OpenGL::GLTexture & | texture, | |
Coordinate | x, | |||
Coordinate | y, | |||
Pixels::FloatColorElement | alpha | |||
) | const [virtual, inherited] |
Displays the specified texture at the specified location on that surface, supposed to be the screen surface, at natural size (i.e.
one pixel of the texture corresponds exactly to one pixel on the screen).
texture | the texture to map. | |
x | the abscissa screen coordinate. | |
y | the ordinate screen coordinate. | |
alpha | a floating-point value in [0,1], from invisible to solid. |
VideoException | if the operation failed. |
Definition at line 2147 of file OSDLSurface.cc.
References OSDL::Video::OpenGL::GLTexture::getHeight(), OSDL::Video::OpenGL::GLTexture::getWidth(), and OSDL::Video::OpenGL::GLTexture::setAsCurrent().
bool UprightRectangle::draw | ( | Surface & | target, | |
Pixels::ColorDefinition | colorDef = Pixels::White , |
|||
bool | filled = true | |||
) | const [virtual, inherited] |
Draws this UprightRectangle to specified surface with specified RGBA color.
target | the surface to which this rectangle will be rendered. | |
filled | tells whether the drawn rectangle should be filled with specified color, or if only its sides should be drawn. |
Definition at line 341 of file OSDLUprightRectangle.cc.
References OSDL::Video::TwoDimensional::UprightRectangle::_x, OSDL::Video::TwoDimensional::UprightRectangle::_y, OSDL::Video::Pixels::convertColorDefinitionToRawPixelColor(), OSDL::Video::TwoDimensional::UprightRectangle::getHeight(), OSDL::Video::Surface::getSDLSurface(), OSDL::Video::TwoDimensional::UprightRectangle::getWidth(), and OSDL::Video::Pixels::toString().
virtual bool OSDL::Video::TwoDimensional::UprightRectangle::draw | ( | Surface & | target, | |
Pixels::ColorElement | red, | |||
Pixels::ColorElement | blue, | |||
Pixels::ColorElement | green, | |||
Pixels::ColorElement | alpha = Pixels::AlphaOpaque , |
|||
bool | filled = true | |||
) | const [virtual, inherited] |
Draws this UprightRectangle to specified surface with specified RGBA color.
target | the surface to which this rectangle will be rendered. | |
filled | tells whether the drawn rectangle should be filled with specified color, or if only its sides should be drawn. |
Referenced by OSDL::Video::Surface::drawLine(), and OSDL::Video::TwoDimensional::UprightRectangle::drawWithRoundedCorners().
virtual bool OSDL::Video::Surface::drawBox | ( | const UprightRectangle & | rectangle, | |
Pixels::ColorDefinition | colorDef = Pixels::White , |
|||
bool | filled = true | |||
) | [virtual, inherited] |
Draws a box with specified RGBA color.
rectangle | the box to fill | |
colorDef | the fill color | |
filled | tells whether the drawn rectangle should be filled with specified color, or if only its sides should be drawn. |
virtual bool OSDL::Video::Surface::drawBox | ( | const UprightRectangle & | rectangle, | |
Pixels::ColorElement | red, | |||
Pixels::ColorElement | green, | |||
Pixels::ColorElement | blue, | |||
Pixels::ColorElement | alpha = Pixels::AlphaOpaque , |
|||
bool | filled = true | |||
) | [virtual, inherited] |
Draws a box with specified RGBA color.
filled | tells whether the drawn rectangle should be filled with specified color, or if only its sides should be drawn. |
Referenced by OSDL::Video::Surface::fill().
bool Surface::drawCircle | ( | Coordinate | xCenter, | |
Coordinate | yCenter, | |||
Length | radius, | |||
Pixels::ColorDefinition | colorDef = Pixels::White , |
|||
bool | filled = true , |
|||
bool | blended = true | |||
) | [virtual, inherited] |
Draws a circle whose center is (xCenter,yCenter) of specified radius, with specified RGBA color, on this surface.
filled | tells whether the circle should be filled (disc). | |
blended | tells whether, for each pixel of disc, the specified color should be blended with the one of the target pixel (if true), or if the specified color should replace the former one, regardless of any blending (if false). Note that only discs may be drawn without being blended: circles are always blended. |
Definition at line 1729 of file OSDLSurface.cc.
References OSDL::Video::Surface::drawCircle().
bool Surface::drawCircle | ( | Coordinate | xCenter, | |
Coordinate | yCenter, | |||
Length | radius, | |||
Pixels::ColorElement | red, | |||
Pixels::ColorElement | green, | |||
Pixels::ColorElement | blue, | |||
Pixels::ColorElement | alpha = Pixels::AlphaOpaque , |
|||
bool | filled = true , |
|||
bool | blended = true | |||
) | [virtual, inherited] |
Draws a circle whose center is (xCenter,yCenter) of specified radius, with specified RGBA color, on this surface.
filled | tells whether the circle should be filled (disc). | |
blended | tells whether, for each pixel of disc, the specified color should be blended with the one of the target pixel (if true), or if the specified color should replace the former one, regardless of any blending (if false). Note that only discs may be drawn without being blended: circles are always blended. |
Definition at line 1716 of file OSDLSurface.cc.
Referenced by OSDL::Video::Surface::drawCircle(), and OSDL::Video::TwoDimensional::drawDiscWithEdge().
bool Surface::drawCross | ( | Coordinate | xCenter, | |
Coordinate | yCenter, | |||
Pixels::ColorDefinition | colorDef = Pixels::White , |
|||
Length | squareEdge = 5 | |||
) | [virtual, inherited] |
Draws a cross centered in center, included in a square whose length of edge is squareEdge.
Definition at line 1645 of file OSDLSurface.cc.
References OSDL::Video::Surface::drawCross().
bool Surface::drawCross | ( | const TwoDimensional::Point2D & | center, | |
Pixels::ColorDefinition | colorDef = Pixels::White , |
|||
Length | squareEdge = 5 | |||
) | [virtual, inherited] |
Draws a cross centered in center, included in a square whose length of edge is squareEdge.
Definition at line 1635 of file OSDLSurface.cc.
Referenced by OSDL::Video::Surface::drawCross().
void Widget::drawDecorations | ( | Surface & | targetSurface | ) | [protected, virtual, inherited] |
Draws the decorations for this widget to specified surface.
targetSurface | must be specified since decorations are not always to be rendered directly on widget surface: for instance for back-buffered widgets, another surface is targeted. |
Definition at line 719 of file OSDLWidget.cc.
References OSDL::Video::TwoDimensional::Widget::_DefaultTitle, OSDL::Video::TwoDimensional::Widget::_EdgeColor, OSDL::Video::TwoDimensional::Widget::_title, OSDL::Video::TwoDimensional::Widget::_TitleBarOffsetOrdinate, OSDL::Video::TwoDimensional::Widget::_TitleColor, OSDL::Video::TwoDimensional::Widget::_TitleHorizontalAlignment, OSDL::Video::TwoDimensional::Widget::_TitleOffsetAbscissa, OSDL::Video::TwoDimensional::Widget::_TitleOffsetOrdinate, OSDL::Video::TwoDimensional::Widget::_TitleVerticalAlignment, OSDL::Video::TwoDimensional::Text::BasicFontCharacterHeight, OSDL::Video::TwoDimensional::Text::BasicFontCharacterWidth, OSDL::Video::TwoDimensional::Text::Bottom, OSDL::Video::Surface::drawHorizontalLine(), OSDL::Video::TwoDimensional::UprightRectangle::getUpperLeftAbscissa(), OSDL::Video::TwoDimensional::UprightRectangle::getUpperLeftOrdinate(), OSDL::Video::Surface::getWidth(), OSDL::Video::TwoDimensional::Text::HeightCentered, OSDL::Video::TwoDimensional::Text::Left, OSDL::Video::Surface::printText(), OSDL::Video::TwoDimensional::Text::Right, OSDL::Video::TwoDimensional::Text::Top, and OSDL::Video::TwoDimensional::Text::WidthCentered.
Referenced by redrawBackBuffer(), and OSDL::Video::TwoDimensional::Widget::redrawInternal().
bool Surface::drawDiscWithEdge | ( | Coordinate | xCenter, | |
Coordinate | yCenter, | |||
Length | outerRadius, | |||
Length | innerRadius, | |||
Pixels::ColorDefinition | ringColorDef = Pixels::Blue , |
|||
Pixels::ColorDefinition | discColorDef = Pixels::White , |
|||
bool | blended = true | |||
) | [virtual, inherited] |
Draws a disc whose center is (xCenter,yCenter), of specified radius (totalRadius), filled with specified color discColorDef, with a ring in it, on its border, i.e.
starting from innerRadius to totalRadius, colored with ringColorDef, on this surface.
xCenter | the abscissa of the center of the disc. | |
yCenter | the ordinate of the center of the disc. | |
outerRadius | the overall disc radius, including the border ring. | |
innerRadius,the | radius from which the ring is drawn, until totalRadius is reached. | |
ringColorDef | the ring color, the color of the border of this disk. | |
discColorDef | the inner color of the disc. | |
blended | tells whether, for each pixel of the edged disc, the specified color should be blended with the one of the target pixel (if true), or if the specified color should replace the former one, regardless of any blending (if false). |
Definition at line 1741 of file OSDLSurface.cc.
Referenced by OSDL::Video::TwoDimensional::UprightRectangle::drawWithRoundedCorners().
bool Surface::drawEdges | ( | Pixels::ColorDefinition | edgeColor = Pixels::White , |
|
Length | edgeWidth = 1 | |||
) | [virtual, inherited] |
Draws the edges of this surface, with specified color and edge width.
edgeColor | the color of edges. | |
edgeWidth | the width of edges. |
Definition at line 1655 of file OSDLSurface.cc.
References OSDL::Video::Surface::drawHorizontalLine(), OSDL::Video::Surface::drawVerticalLine(), OSDL::Video::Surface::getHeight(), and OSDL::Video::Surface::getWidth().
Referenced by OSDL::Video::TwoDimensional::Widget::drawFundamentals().
bool Surface::drawEllipse | ( | Coordinate | xCenter, | |
Coordinate | yCenter, | |||
Length | horizontalRadius, | |||
Length | verticalRadius, | |||
Pixels::ColorDefinition | colorDef, | |||
bool | filled = true | |||
) | [virtual, inherited] |
Draws an ellipse whose center is (xCenter,yCenter), with specified horizontal and vertical radii, with specified RGBA color, on this surface.
filled | tells whether the ellipse should be filled. |
Definition at line 1767 of file OSDLSurface.cc.
References OSDL::Video::Surface::drawEllipse().
bool Surface::drawEllipse | ( | Coordinate | xCenter, | |
Coordinate | yCenter, | |||
Length | horizontalRadius, | |||
Length | verticalRadius, | |||
Pixels::ColorElement | red, | |||
Pixels::ColorElement | green, | |||
Pixels::ColorElement | blue, | |||
Pixels::ColorElement | alpha = Pixels::AlphaOpaque , |
|||
bool | filled = true | |||
) | [virtual, inherited] |
Draws an ellipse whose center is (xCenter,yCenter), with specified horizontal and vertical radii, with specified RGBA color, on this surface.
filled | tells whether the ellipse should be filled. |
Definition at line 1754 of file OSDLSurface.cc.
Referenced by OSDL::Video::Surface::drawEllipse().
void Widget::drawFundamentals | ( | Surface & | targetSurface | ) | [protected, virtual, inherited] |
Draws the fundamental parts of a widget: widget area cleaned accordingly to the current base color mode, and edges are drawn.
Remains not static to allow easy override, and needs widget attributes.
Definition at line 695 of file OSDLWidget.cc.
References OSDL::Video::TwoDimensional::Widget::_EdgeColor, OSDL::Video::TwoDimensional::Widget::clean(), and OSDL::Video::Surface::drawEdges().
Referenced by redrawBackBuffer(), and OSDL::Video::TwoDimensional::Widget::redrawInternal().
bool Surface::drawGrid | ( | Length | columnStride = 20 , |
|
Length | rowStride = 20 , |
|||
Pixels::ColorDefinition | lineColor = Pixels::White , |
|||
bool | fillBackground = false , |
|||
Pixels::ColorDefinition | backgroundColor = Pixels::Black | |||
) | [virtual, inherited] |
Draws a grid, with specified space between columns and rows and specified colors.
columnStride | the number of pixels between two columns. | |
rowStride | the number of pixels between two rows. | |
lineColor | the color of the grid lines. | |
fillBackground | tells whether a background should be filled. | |
backgroundColor | the color of the background, if activated. |
Definition at line 1881 of file OSDLSurface.cc.
References OSDL::Video::Surface::drawHorizontalLine(), OSDL::Video::Surface::drawVerticalLine(), OSDL::Video::Surface::fill(), OSDL::Video::Surface::getHeight(), and OSDL::Video::Surface::getWidth().
bool Surface::drawHorizontalLine | ( | Coordinate | xStart, | |
Coordinate | xStop, | |||
Coordinate | y, | |||
Pixels::ColorDefinition | colorDef = Pixels::White | |||
) | [virtual, inherited] |
Draws an horizontal line ranging from point (xStart;y), included, to point (xStop;y), included if and only if endpoint drawing mode is set, with specified RGBA color, in this surface.
Definition at line 1577 of file OSDLSurface.cc.
References OSDL::Video::TwoDimensional::Line::drawHorizontal().
bool Surface::drawHorizontalLine | ( | Coordinate | xStart, | |
Coordinate | xStop, | |||
Coordinate | y, | |||
Pixels::PixelColor | actualColor | |||
) | [virtual, inherited] |
Draws an horizontal line ranging from point (xStart;y), included, to point (xStop;y), included if and only if endpoint drawing mode is set, with specified actual RGBA pixel color, in this surface.
Definition at line 1567 of file OSDLSurface.cc.
References OSDL::Video::TwoDimensional::Line::drawHorizontal().
bool Surface::drawHorizontalLine | ( | Coordinate | xStart, | |
Coordinate | xStop, | |||
Coordinate | y, | |||
Pixels::ColorElement | red, | |||
Pixels::ColorElement | green, | |||
Pixels::ColorElement | blue, | |||
Pixels::ColorElement | alpha = Pixels::AlphaOpaque | |||
) | [virtual, inherited] |
Draws an horizontal line ranging from point (xStart;y), included, to point (xStop;y), included if and only if endpoint drawing mode is set, with specified RGBA color, in this surface.
Definition at line 1555 of file OSDLSurface.cc.
References OSDL::Video::TwoDimensional::Line::drawHorizontal().
Referenced by OSDL::Video::TwoDimensional::Widget::drawDecorations(), OSDL::Video::Surface::drawEdges(), and OSDL::Video::Surface::drawGrid().
bool Surface::drawLine | ( | Coordinate | xStart, | |
Coordinate | yStart, | |||
Coordinate | xStop, | |||
Coordinate | yStop, | |||
Pixels::ColorDefinition | colorDef = Pixels::White | |||
) | [virtual, inherited] |
Draws a line in this surface, ranging from point (xStart;yStart), included, to point (xStop;yStop), included if and only if endpoint drawing mode is set, with specified RGBA color.
Definition at line 1624 of file OSDLSurface.cc.
References OSDL::Video::TwoDimensional::UprightRectangle::draw().
bool Surface::drawLine | ( | Coordinate | xStart, | |
Coordinate | yStart, | |||
Coordinate | xStop, | |||
Coordinate | yStop, | |||
Pixels::ColorElement | red, | |||
Pixels::ColorElement | green, | |||
Pixels::ColorElement | blue, | |||
Pixels::ColorElement | alpha = Pixels::AlphaOpaque | |||
) | [virtual, inherited] |
Draws a line in this surface, ranging from point (xStart;yStart), included, to point (xStop;yStop), included if and only if endpoint drawing mode is set, with specified RGBA color.
Definition at line 1611 of file OSDLSurface.cc.
References OSDL::Video::TwoDimensional::UprightRectangle::draw().
bool Surface::drawPie | ( | Coordinate | xCenter, | |
Coordinate | yCenter, | |||
Length | radius, | |||
Ceylan::Maths::AngleInDegrees | angleStart, | |||
Ceylan::Maths::AngleInDegrees | angleStop, | |||
Pixels::ColorDefinition | colorDef | |||
) | [virtual, inherited] |
Draws a polygon-based filled pie whose center is (xCenter,yCenter) of specified radius, with specified RGBA color, on this surface, starting from angleStart, stopping to angleStop.
xCenter | the abscissa of the center of the pie. | |
yCenter | the ordinate of the center of the pie. | |
radius | the radius of the pie. | |
angleStart | the starting angle of the pie, in degrees. | |
angleStop | the stopping angle of the pie, in degrees. | |
colorDef | the color definition of fill color. |
Definition at line 1793 of file OSDLSurface.cc.
References OSDL::Video::Surface::drawPie().
bool Surface::drawPie | ( | Coordinate | xCenter, | |
Coordinate | yCenter, | |||
Length | radius, | |||
Ceylan::Maths::AngleInDegrees | angleStart, | |||
Ceylan::Maths::AngleInDegrees | angleStop, | |||
Pixels::ColorElement | red, | |||
Pixels::ColorElement | green, | |||
Pixels::ColorElement | blue, | |||
Pixels::ColorElement | alpha = Pixels::AlphaOpaque | |||
) | [virtual, inherited] |
Draws a polygon-based filled pie whose center is (xCenter,yCenter) of specified radius, with specified RGBA color, on this surface, starting from angleStart, stopping to angleStop, both expressed in degrees.
xCenter | the abscissa of the center of the pie. | |
yCenter | the ordinate of the center of the pie. | |
radius | the radius of the pie. | |
angleStart | the starting angle of the pie, in degrees. | |
angleStop | the stopping angle of the pie, in degrees. | |
red | the red color coordinate of fill color. | |
green | the green color coordinate of fill color. | |
blue | the blue color coordinate of fill color. | |
alpha | the alpha color coordinate of fill color. |
Definition at line 1779 of file OSDLSurface.cc.
Referenced by OSDL::Video::Surface::drawPie().
bool Surface::drawPolygon | ( | const std::list< TwoDimensional::Point2D * > | summits, | |
Coordinate | x, | |||
Coordinate | y, | |||
Pixels::ColorDefinition | colorDef, | |||
bool | filled = true | |||
) | [virtual, inherited] |
Draws a polygon defined by specified list of points, with specified RGBA color, on specified surface.
summits | could be a 'const' list of 'const' Point2D pointers, but the STL would not be able to match it with mostly used argument 'const list of Point2D non-const pointers'. | |
x | the abscissa the polygon should be translated of, on screen. | |
y | the ordinate the polygon should be translated of, on screen. | |
filled | tells whether the polygon should be filled. |
Definition at line 1856 of file OSDLSurface.cc.
References OSDL::Video::Surface::drawPolygon().
bool Surface::drawPolygon | ( | const std::list< TwoDimensional::Point2D * > | summits, | |
Coordinate | x, | |||
Coordinate | y, | |||
Pixels::ColorElement | red, | |||
Pixels::ColorElement | green, | |||
Pixels::ColorElement | blue, | |||
Pixels::ColorElement | alpha = Pixels::AlphaOpaque , |
|||
bool | filled = true | |||
) | [virtual, inherited] |
Draws a polygon defined by specified list of points, with specified RGBA color, on specified surface.
summits | could be a 'const' list of 'const' Point2D pointers, but the STL would not be able to match it with mostly used argument 'const list of Point2D non-const pointers'. | |
x | the abscissa the polygon should be translated of, on screen. | |
y | the ordinate the polygon should be translated of, on screen. | |
filled | tells whether the polygon should be filled. |
Definition at line 1868 of file OSDLSurface.cc.
Referenced by OSDL::Video::Surface::drawPolygon().
bool Surface::drawTriangle | ( | const TwoDimensional::Point2D & | p1, | |
const TwoDimensional::Point2D & | p2, | |||
const TwoDimensional::Point2D & | p3, | |||
Pixels::ColorDefinition | colorDef, | |||
bool | filled = true | |||
) | [virtual, inherited] |
Draws a triangle defined by specified three points, with specified RGBA color, on this surface.
filled | tells whether the triangle should be filled (disc). |
Definition at line 1845 of file OSDLSurface.cc.
References OSDL::Video::Surface::drawTriangle().
bool Surface::drawTriangle | ( | const TwoDimensional::Point2D & | p1, | |
const TwoDimensional::Point2D & | p2, | |||
const TwoDimensional::Point2D & | p3, | |||
Pixels::ColorElement | red, | |||
Pixels::ColorElement | green, | |||
Pixels::ColorElement | blue, | |||
Pixels::ColorElement | alpha = Pixels::AlphaOpaque , |
|||
bool | filled = true | |||
) | [virtual, inherited] |
Draws a triangle defined by specified three points, with specified RGBA color, on this surface.
filled | tells whether the triangle should be filled (disc). |
Definition at line 1832 of file OSDLSurface.cc.
References OSDL::Video::Surface::drawTriangle().
bool Surface::drawTriangle | ( | Coordinate | x1, | |
Coordinate | y1, | |||
Coordinate | x2, | |||
Coordinate | y2, | |||
Coordinate | x3, | |||
Coordinate | y3, | |||
Pixels::ColorDefinition | colorDef, | |||
bool | filled = true | |||
) | [virtual, inherited] |
Draws a triangle defined by specified three points, with specified RGBA color, on this surface.
filled | tells whether the triangle should be filled (disc). |
Definition at line 1820 of file OSDLSurface.cc.
References OSDL::Video::Surface::drawTriangle().
bool Surface::drawTriangle | ( | Coordinate | x1, | |
Coordinate | y1, | |||
Coordinate | x2, | |||
Coordinate | y2, | |||
Coordinate | x3, | |||
Coordinate | y3, | |||
Pixels::ColorElement | red, | |||
Pixels::ColorElement | green, | |||
Pixels::ColorElement | blue, | |||
Pixels::ColorElement | alpha = Pixels::AlphaOpaque , |
|||
bool | filled = true | |||
) | [virtual, inherited] |
Draws a triangle defined by specified three points, with specified RGBA color, on this surface.
filled | tells whether the triangle should be filled (disc). |
Definition at line 1807 of file OSDLSurface.cc.
Referenced by OSDL::Video::Surface::drawTriangle().
bool Surface::drawVerticalLine | ( | Coordinate | x, | |
Coordinate | yStart, | |||
Coordinate | yStop, | |||
Pixels::ColorDefinition | colorDef = Pixels::White | |||
) | [virtual, inherited] |
Draws a vertical line ranging from point (x;yStart), included, to point (x;yStop), included if and only if endpoint drawing mode is set, with specified RGBA color, in this surface.
Definition at line 1600 of file OSDLSurface.cc.
References OSDL::Video::TwoDimensional::Line::drawVertical().
bool Surface::drawVerticalLine | ( | Coordinate | x, | |
Coordinate | yStart, | |||
Coordinate | yStop, | |||
Pixels::ColorElement | red, | |||
Pixels::ColorElement | green, | |||
Pixels::ColorElement | blue, | |||
Pixels::ColorElement | alpha = Pixels::AlphaOpaque | |||
) | [virtual, inherited] |
Draws a vertical line ranging from point (x;yStart), included, to point (x;yStop), included if and only if endpoint drawing mode is set, with specified RGBA color, in this surface.
Definition at line 1588 of file OSDLSurface.cc.
References OSDL::Video::TwoDimensional::Line::drawVertical().
Referenced by OSDL::Video::Surface::drawEdges(), and OSDL::Video::Surface::drawGrid().
bool UprightRectangle::drawWithRoundedCorners | ( | Surface & | target, | |
Length | edgeWidth = 3 , |
|||
Pixels::ColorDefinition | edgeColorDef = Pixels::White , |
|||
Pixels::ColorDefinition | backgroundColorDef = Pixels::Transparent | |||
) | const [virtual, inherited] |
Draws this UprightRectangle to specified surface with rounded corners, drawn with specified color, above a background of specified color.
The width of the borders can be chosen, and should not be incompatible with the dimensions of this rectangle.
target | the surface to which this rectangle will be rendered. | |
edgeWidth | the width of the edges of this rectangle. | |
edgeColorDef | the color definition of the edges of this rectangle. | |
backgroundColorDef | the color definition of the background of this rectangle. |
Definition at line 395 of file OSDLUprightRectangle.cc.
References OSDL::Video::TwoDimensional::UprightRectangle::_x, OSDL::Video::TwoDimensional::UprightRectangle::_y, OSDL::Video::Surface::AlphaBlendingBlit, OSDL::Video::Pixels::AlphaOpaque, OSDL::Video::Surface::blitTo(), OSDL::Video::Surface::ColorkeyBlit, OSDL::Video::TwoDimensional::UprightRectangle::computeRadiusForRoundRectangle(), OSDL::Video::Surface::describePixelAt(), OSDL::Video::TwoDimensional::UprightRectangle::draw(), OSDL::Video::Surface::drawDiscWithEdge(), OSDL::Video::Surface::fill(), OSDL::Video::Surface::getBitsPerPixel(), OSDL::Video::Pixels::getCurrentColorMasks(), OSDL::Video::TwoDimensional::UprightRectangle::getHeight(), OSDL::Video::Surface::getPixelFormat(), OSDL::Video::TwoDimensional::UprightRectangle::getWidth(), OSDL::Video::Surface::RLEColorkeyBlit, OSDL::Video::Surface::savePNG(), OSDL::Video::Pixels::selectColorDifferentFrom(), OSDL::Video::Surface::setColorKey(), OSDL::Video::TwoDimensional::UprightRectangle::setUpperLeftAbscissa(), OSDL::Video::TwoDimensional::UprightRectangle::setUpperLeftOrdinate(), OSDL::Video::TwoDimensional::Point2D::setX(), OSDL::Video::TwoDimensional::Point2D::setY(), OSDL::Video::Surface::Software, OSDL::Video::Surface::toString(), and OSDL::Video::Pixels::toString().
Referenced by redrawBackBuffer().
bool Surface::fill | ( | Pixels::ColorDefinition | colorDef = Pixels::Black |
) | [virtual, inherited] |
Fills this surface with specified color.
Can be used for blanking a surface, if the background color is chosen.
colorDef | the color definition of the fill color. |
Definition at line 946 of file OSDLSurface.cc.
References OSDL::Video::TwoDimensional::UprightRectangle::_x, OSDL::Video::TwoDimensional::UprightRectangle::_y, OSDL::Video::Surface::drawBox(), OSDL::Video::Surface::getHeight(), OSDL::Video::Surface::getWidth(), and OSDL::Video::Pixels::toString().
Referenced by OSDL::Video::TwoDimensional::Text::FixedFont::basicRenderLatin1Glyph(), OSDL::Video::TwoDimensional::Text::Font::basicRenderLatin1Text(), OSDL::Video::TwoDimensional::Text::TrueTypeFont::basicRenderUnicodeGlyph(), OSDL::Video::TwoDimensional::Widget::clean(), OSDL::Video::Surface::clear(), OSDL::Video::Surface::drawGrid(), OSDL::Video::TwoDimensional::UprightRectangle::drawWithRoundedCorners(), redrawBackBuffer(), OSDL::Video::TwoDimensional::BackBufferedWidget::redrawInternal(), OSDL::Video::TwoDimensional::Text::Font::renderLatin1MultiLineText(), OSDL::Video::TwoDimensional::Text::TrueTypeFont::renderLatin1Text(), OSDL::Video::TwoDimensional::Text::Font::renderLatin1TextWithWordCached(), OSDL::Video::TwoDimensional::Text::TrueTypeFont::renderUnicodeText(), and OSDL::Video::TwoDimensional::Text::TrueTypeFont::renderUTF8Text().
Surface & Surface::flipHorizontal | ( | ) | const [virtual, inherited] |
Returns the result of an horizontal flip of this source surface: the result will contain the original image mirrored according to an horizontal line splitting this surface into a top and bottom area of equal size.
Something looking as '^' would be flipped into 'v'.
VideoException | if the operation failed or is not supported. |
Definition at line 1055 of file OSDLSurface.cc.
References OSDL::Video::Surface::_surface, and OSDL::Video::Surface::Surface().
Surface & Surface::flipVertical | ( | ) | const [virtual, inherited] |
Returns the result of a vertical flip of this source surface: the result will contain the original image mirrored according to a vertical line splitting this surface into a left and right area of equal size.
Something looking as '>' would be flipped into '<'.
VideoException | if the operation failed or is not supported. |
Definition at line 1003 of file OSDLSurface.cc.
References OSDL::Video::Surface::_surface, and OSDL::Video::Surface::Surface().
void Surface::flush | ( | ) | [protected, virtual, inherited] |
Releases internal SDL surface.
Definition at line 4173 of file OSDLSurface.cc.
References OSDL::Video::Surface::_displayType, OSDL::Video::Surface::_surface, OSDL::Video::Surface::BackBuffer, and OSDL::Video::Surface::inconsistencyDetected().
Referenced by OSDL::Video::Surface::setSDLSurface(), and OSDL::Video::Surface::~Surface().
bool BackBufferedWidget::getBackBufferRedrawState | ( | ) | const [protected, virtual, inherited] |
Returns the current need for redraw state for the back-buffer.
Definition at line 423 of file OSDLBackBufferedWidget.cc.
References OSDL::Video::TwoDimensional::BackBufferedWidget::_needsBackBufferRedraw.
Referenced by OSDL::Video::TwoDimensional::BackBufferedWidget::redrawInternal(), OSDL::Video::TwoDimensional::BackBufferedWidget::setBackBufferRedrawState(), and OSDL::Video::TwoDimensional::BackBufferedWidget::toString().
Pixels::ColorDefinition Widget::getBaseColor | ( | ) | const [virtual, inherited] |
Returns the current base color.
Definition at line 292 of file OSDLWidget.cc.
References OSDL::Video::TwoDimensional::Widget::_baseColor.
Widget::BaseColorMode Widget::getBaseColorMode | ( | ) | const [virtual, inherited] |
Returns the current base color mode.
Definition at line 214 of file OSDLWidget.cc.
References OSDL::Video::TwoDimensional::Widget::_baseColorMode.
Referenced by OSDL::Video::TwoDimensional::BackBufferedWidget::redrawInternal().
BitsPerPixel Surface::getBitsPerPixel | ( | ) | const [virtual, inherited] |
Returns this surface's color depth, bits per pixel.
Definition at line 1298 of file OSDLSurface.cc.
References OSDL::Video::Surface::_surface.
Referenced by OSDL::Video::TwoDimensional::BackBufferedWidget::BackBufferedWidget(), OSDL::Video::Surface::clone(), OSDL::Video::TwoDimensional::UprightRectangle::drawWithRoundedCorners(), OSDL::Video::VideoModule::resize(), OSDL::Video::Surface::resize(), OSDL::Video::VideoModule::setMode(), and OSDL::Video::Surface::toString().
BytesPerPixel Surface::getBytesPerPixel | ( | ) | const [virtual, inherited] |
Returns this surface's overall color depth, bytes per pixel.
Definition at line 1330 of file OSDLSurface.cc.
References OSDL::Video::Surface::_surface.
Referenced by OSDL::Video::Pixels::alternativePutPixelColor(), and OSDL::Video::Pixels::getPixelColor().
const UprightRectangle & Widget::getClientArea | ( | ) | const [virtual, inherited] |
Returns an upright rectangle which describes the client area, in widget referential.
Client area is the total usable area that is left for this widget specific renderings.
Definition at line 310 of file OSDLWidget.cc.
References OSDL::Video::TwoDimensional::Widget::_clientArea.
UprightRectangle & Surface::getClippingArea | ( | ) | const [virtual, inherited] |
Returns this surface's clipping area, expressed thanks to an UprightRectangle.
Should not be confused with the actual area corresponding to this surface, which is another UprightRectangle.
VideoException | if the operation failed or is not supported. |
Definition at line 2899 of file OSDLSurface.cc.
References OSDL::Video::Surface::_surface, and OSDL::Video::TwoDimensional::UprightRectangle::UprightRectangle().
Pixels::ColorDefinition Surface::getColorDefinitionAt | ( | Coordinate | x, | |
Coordinate | y | |||
) | const [virtual, inherited] |
Returns the color definition of one particular pixel of this surface, located at [x;y].
If this surface has no alpha coordinate, then the fourth color coordinate of the returned definition will be AlphaOpaque.
No clipping is performed, the surface should have been previously locked if necessary.
Definition at line 1408 of file OSDLSurface.cc.
References OSDL::Video::Pixels::convertPixelColorToColorDefinition(), OSDL::Video::Pixels::getPixelColor(), and OSDL::Video::Surface::getPixelFormat().
Referenced by OSDL::Video::TwoDimensional::Image::SavePNG(), and OSDL::Video::Surface::setAlphaForColor().
const Surface & Widget::getConstContainer | ( | ) | const [protected, virtual, inherited] |
Returns this widget's container surface as a 'const' object.
Definition at line 666 of file OSDLWidget.cc.
References OSDL::Video::Pixels::toString().
Referenced by OSDL::Video::TwoDimensional::Widget::toString().
Surface & Widget::getContainer | ( | ) | [protected, virtual, inherited] |
Returns this widget's container surface.
Definition at line 637 of file OSDLWidget.cc.
References OSDL::Video::Pixels::toString().
Referenced by OSDL::Video::TwoDimensional::Widget::redraw(), OSDL::Video::TwoDimensional::BackBufferedWidget::redraw(), OSDL::Video::TwoDimensional::Widget::setBaseColorMode(), OSDL::Video::TwoDimensional::Widget::setRedrawState(), and OSDL::Video::TwoDimensional::Widget::Widget().
UprightRectangle & Surface::getContentArea | ( | ) | const [virtual, inherited] |
Returns this surface's content area, expressed thanks to an UprightRectangle.
The content area is the smallest upright rectangle which encloses all the image pixels whose color is different from the guessed colorkey.
VideoException | if the operation failed or is not supported. |
Definition at line 2936 of file OSDLSurface.cc.
References OSDL::Video::Pixels::areEqual(), OSDL::Video::Surface::getHeight(), OSDL::Video::Surface::getPixelColorAt(), OSDL::Video::Surface::getWidth(), OSDL::Video::Surface::guessColorKey(), and OSDL::Video::TwoDimensional::UprightRectangle::UprightRectangle().
Surface::DisplayType Surface::getDisplayType | ( | ) | const [virtual, inherited] |
Returns the display type (back-buffer, screen, etc.
) of this Surface.
Definition at line 564 of file OSDLSurface.cc.
References OSDL::Video::Surface::_displayType.
Referenced by OSDL::Video::VideoModule::setScreenSurface().
Pixels::ColorDefinition Widget::GetEdgeColor | ( | ) | [static, inherited] |
Returns the current default edge color for all new widgets.
Definition at line 565 of file OSDLWidget.cc.
References OSDL::Video::TwoDimensional::Widget::_EdgeColor.
Ceylan::Flags Surface::getFlags | ( | ) | const [virtual, inherited] |
Returns the flags caracterizing this surface.
Definition at line 582 of file OSDLSurface.cc.
References OSDL::Video::Surface::_surface.
Referenced by OSDL::Video::TwoDimensional::BackBufferedWidget::BackBufferedWidget(), OSDL::Video::Surface::clone(), OSDL::Video::Surface::convertFromColorKeyToAlphaChannel(), OSDL::Video::VideoModule::resize(), OSDL::Video::Surface::resize(), OSDL::Video::Surface::setAlphaForColor(), OSDL::Video::VideoModule::setMode(), OSDL::Video::OpenGL::GLTexture::setUpInternalSurfaceFrom(), OSDL::Video::Surface::toString(), and OSDL::Video::TwoDimensional::Widget::Widget().
Length Surface::getHeight | ( | ) | const [virtual, inherited] |
Returns the height of this Surface.
Reimplemented from OSDL::Video::TwoDimensional::UprightRectangle.
Definition at line 1174 of file OSDLSurface.cc.
References OSDL::Video::Surface::_surface.
Referenced by OSDL::Video::Surface::centerMousePosition(), OSDL::Video::Surface::clone(), OSDL::Video::Surface::createColorReducedSurfaceFor(), OSDL::Video::Surface::displayAtCenter(), OSDL::Video::Surface::displayAtCenterWithAlpha(), OSDL::Video::Surface::displayAtCenterWithFadeIn(), OSDL::Video::Surface::displayAtCenterWithFadeOut(), OSDL::Video::Surface::displayInFullscreen(), OSDL::Video::Surface::displayInFullscreenSizeWithAlphaAt(), OSDL::Video::Surface::displayInFullscreenWithAlpha(), OSDL::Video::Surface::drawEdges(), OSDL::Video::Surface::drawGrid(), OSDL::Video::Surface::fill(), OSDL::Video::Surface::getContentArea(), OSDL::Video::Surface::guessColorKey(), OSDL::Video::TwoDimensional::Image::LoadIcon(), redrawBackBuffer(), OSDL::Video::TwoDimensional::Widget::resize(), OSDL::Video::Surface::resize(), OSDL::Video::TwoDimensional::Image::SavePNG(), OSDL::Video::Surface::setAlphaForColor(), OSDL::Video::VideoModule::setMode(), OSDL::Video::OpenGL::GLTexture::setUpInternalSurfaceFrom(), OSDL::Video::TwoDimensional::Widget::setWidth(), OSDL::Video::Surface::setWidth(), OSDL::Video::TwoDimensional::Widget::toString(), toString(), OSDL::Video::Surface::toString(), OSDL::Video::TwoDimensional::Widget::updateClientArea(), and updateClientArea().
Coordinate UprightRectangle::getLowerRightAbscissa | ( | ) | const [virtual, inherited] |
Returns directly the abscissa of lower right corner.
Definition at line 243 of file OSDLUprightRectangle.cc.
References OSDL::Video::TwoDimensional::UprightRectangle::_x, and OSDL::Video::TwoDimensional::UprightRectangle::getWidth().
Point2D UprightRectangle::getLowerRightCorner | ( | ) | const [virtual, inherited] |
Returns this UprightRectangle's lower right corner.
Definition at line 217 of file OSDLUprightRectangle.cc.
References OSDL::Video::TwoDimensional::UprightRectangle::_x, OSDL::Video::TwoDimensional::UprightRectangle::_y, OSDL::Video::TwoDimensional::UprightRectangle::getHeight(), and OSDL::Video::TwoDimensional::UprightRectangle::getWidth().
Coordinate UprightRectangle::getLowerRightOrdinate | ( | ) | const [virtual, inherited] |
Returns directly the ordinate of lower right corner.
Definition at line 267 of file OSDLUprightRectangle.cc.
References OSDL::Video::TwoDimensional::UprightRectangle::_y, and OSDL::Video::TwoDimensional::UprightRectangle::getHeight().
Offset Surface::getOffset | ( | ) | const [inline, protected, inherited] |
Returns this surface's offset.
Definition at line 4143 of file OSDLSurface.cc.
References OSDL::Video::Surface::_surface.
Palette & Surface::getPalette | ( | ) | const [virtual, inherited] |
Returns a palette associated with this surface, if any.
Ownership of the palette is transfered to the caller.
VideoException | if not palette is available. |
Definition at line 772 of file OSDLSurface.cc.
References OSDL::Video::Surface::_surface.
Pitch Surface::getPitch | ( | ) | const [virtual, inherited] |
Returns this surface's pitch.
Definition at line 1118 of file OSDLSurface.cc.
References OSDL::Video::Surface::_surface.
Referenced by OSDL::Video::Pixels::alternativePutPixelColor(), OSDL::Video::Pixels::getPixelColor(), OSDL::Video::TwoDimensional::Image::LoadIcon(), and OSDL::Video::Surface::toString().
Pixels::PixelColor Surface::getPixelColorAt | ( | Coordinate | x, | |
Coordinate | y | |||
) | const [virtual, inherited] |
Returns the pixel color of one particular pixel of this surface, located at [x;y], encoded according to the pixel format of this surface.
No clipping is performed, the surface should have been previously locked if necessary.
Definition at line 1398 of file OSDLSurface.cc.
References OSDL::Video::Pixels::getPixelColor().
Referenced by OSDL::Video::Surface::createColorReducedSurfaceFor(), OSDL::Video::Surface::describePixelAt(), OSDL::Video::Surface::getContentArea(), and OSDL::Video::Surface::guessColorKey().
Pixels::PixelFormat & Surface::getPixelFormat | ( | ) | const [virtual, inherited] |
Returns this surface's pixel format.
VideoException | if the operation failed, including if there is no pixel format to retrieve. |
Definition at line 911 of file OSDLSurface.cc.
References OSDL::Video::Surface::_surface.
Referenced by OSDL::Video::Pixels::alternativePutPixelColor(), OSDL::Video::TwoDimensional::BackBufferedWidget::BackBufferedWidget(), OSDL::Video::TwoDimensional::Text::FixedFont::basicRenderLatin1Glyph(), OSDL::Video::TwoDimensional::Text::Font::basicRenderLatin1Text(), OSDL::Video::TwoDimensional::Text::TrueTypeFont::basicRenderUnicodeGlyph(), OSDL::Video::Surface::clone(), OSDL::Video::Surface::createColorReducedSurfaceFor(), OSDL::Video::Surface::describePixelAt(), OSDL::Video::TwoDimensional::UprightRectangle::drawWithRoundedCorners(), OSDL::Video::Pixels::getColorDefinition(), OSDL::Video::Surface::getColorDefinitionAt(), OSDL::Video::Surface::guessColorKeyDefinition(), OSDL::Video::TwoDimensional::Image::LoadIcon(), OSDL::Video::Pixels::putColorDefinition(), OSDL::Video::Pixels::putRGBAPixel(), OSDL::Video::TwoDimensional::Text::Font::renderLatin1MultiLineText(), OSDL::Video::TwoDimensional::Text::TrueTypeFont::renderLatin1Text(), OSDL::Video::TwoDimensional::Text::Font::renderLatin1TextWithWordCached(), OSDL::Video::TwoDimensional::Text::TrueTypeFont::renderUnicodeText(), OSDL::Video::TwoDimensional::Text::TrueTypeFont::renderUTF8Text(), OSDL::Video::Surface::resize(), OSDL::Video::TwoDimensional::Widget::setBaseColorMode(), OSDL::Video::TwoDimensional::BackBufferedWidget::setBaseColorMode(), and OSDL::Video::VideoModule::setMode().
void * Surface::getPixels | ( | ) | const [virtual, inherited] |
Returns this surface's video buffer, i.e.
its whole set of pixels.
Definition at line 1362 of file OSDLSurface.cc.
References OSDL::Video::Surface::_surface.
Referenced by OSDL::Video::Pixels::alternativePutPixelColor(), OSDL::Video::Pixels::getPixelColor(), and OSDL::Video::TwoDimensional::Image::LoadIcon().
bool Surface::getRedrawState | ( | ) | const [virtual, inherited] |
Returns the current need for redraw state.
Definition at line 3331 of file OSDLSurface.cc.
References OSDL::Video::Surface::_needsRedraw.
Referenced by OSDL::Video::TwoDimensional::Widget::redraw(), OSDL::Video::Surface::redraw(), OSDL::Video::TwoDimensional::BackBufferedWidget::redraw(), OSDL::Video::TwoDimensional::Widget::setRedrawState(), and OSDL::Video::TwoDimensional::Widget::toString().
Text::TextIndex TextWidget::getRenderIndex | ( | ) | const [virtual] |
Returns the current index of the first character of current text that could not be rendered in this widget, if a rendering has already been done.
Otherwise returns zero, as long as no text had to be rendered.
Therefore if the full text could be displayed, returns the size of the string returned by the getText method. Less than that means the text is too long for the display.
Definition at line 186 of file OSDLTextWidget.cc.
References _currentIndex.
LowLevelSurface & Surface::getSDLSurface | ( | ) | const [virtual, inherited] |
Returns the SDL surface corresponding to that surface.
Definition at line 540 of file OSDLSurface.cc.
References OSDL::Video::Surface::_surface.
Referenced by OSDL::Video::TwoDimensional::Text::FixedFont::basicBlitLatin1Glyph(), OSDL::Video::TwoDimensional::Text::TrueTypeFont::basicRenderUnicodeGlyph(), OSDL::Video::Surface::blitTo(), OSDL::Video::TwoDimensional::UprightRectangle::draw(), OSDL::Video::TwoDimensional::drawBezierCurve(), OSDL::Video::TwoDimensional::drawCircle(), OSDL::Video::TwoDimensional::drawEllipse(), OSDL::Video::TwoDimensional::Line::drawHorizontal(), OSDL::Video::TwoDimensional::drawPie(), OSDL::Video::TwoDimensional::drawPolygon(), OSDL::Video::TwoDimensional::drawTriangle(), OSDL::Video::TwoDimensional::Image::Load(), OSDL::Video::TwoDimensional::Image::LoadBMP(), OSDL::Video::TwoDimensional::Image::LoadGIF(), OSDL::Video::TwoDimensional::Image::LoadJPG(), OSDL::Video::TwoDimensional::Image::LoadLBM(), OSDL::Video::TwoDimensional::Image::LoadPCX(), OSDL::Video::TwoDimensional::Image::LoadPNG(), OSDL::Video::TwoDimensional::Image::LoadPNM(), OSDL::Video::TwoDimensional::Image::LoadTGA(), OSDL::Video::TwoDimensional::Image::LoadXPM(), OSDL::Video::Overlay::Overlay(), OSDL::Video::TwoDimensional::Text::printBasic(), OSDL::Video::Pixels::putPixelColor(), OSDL::Video::TwoDimensional::Text::TrueTypeFont::renderLatin1Text(), OSDL::Video::TwoDimensional::Text::TrueTypeFont::renderUnicodeText(), OSDL::Video::TwoDimensional::Text::TrueTypeFont::renderUTF8Text(), OSDL::Video::TwoDimensional::Image::SaveBMP(), OSDL::Video::VideoModule::setWindowIcon(), and OSDL::Video::VideoModule::toggleFullscreen().
Ceylan::System::Size Surface::getSizeInMemory | ( | ) | const [virtual, inherited] |
Returns the approximate size in memory, in bytes, currently taken by this object.
Definition at line 3578 of file OSDLSurface.cc.
References OSDL::Video::Surface::_surface.
Referenced by OSDL::Video::Surface::toString().
const std::string & TextWidget::getText | ( | ) | const [virtual] |
Returns the text which is currently being displayed by this widget.
Definition at line 177 of file OSDLTextWidget.cc.
References _text.
UpdateCount Surface::getUpdateCount | ( | ) | const [virtual, inherited] |
Returns the current number of updates for that surface.
Counts the number of times this surface has been updated once initialized.
Definition at line 3240 of file OSDLSurface.cc.
References OSDL::Video::Surface::_updateCount.
Referenced by OSDL::Video::VideoModule::getAverageRefreshRate().
Coordinate UprightRectangle::getUpperLeftAbscissa | ( | ) | const [virtual, inherited] |
Returns directly the abscissa of upper left corner.
Definition at line 176 of file OSDLUprightRectangle.cc.
References OSDL::Video::TwoDimensional::UprightRectangle::_x.
Referenced by OSDL::Video::TwoDimensional::Text::Font::blitLatin1MultiLineText(), OSDL::Video::TwoDimensional::Widget::drawDecorations(), and redrawBackBuffer().
Point2D UprightRectangle::getUpperLeftCorner | ( | ) | const [virtual, inherited] |
Returns this UprightRectangle's upper left corner.
Definition at line 157 of file OSDLUprightRectangle.cc.
References OSDL::Video::TwoDimensional::UprightRectangle::_x, and OSDL::Video::TwoDimensional::UprightRectangle::_y.
Coordinate UprightRectangle::getUpperLeftOrdinate | ( | ) | const [virtual, inherited] |
Returns directly the ordinate of upper left corner.
Definition at line 194 of file OSDLUprightRectangle.cc.
References OSDL::Video::TwoDimensional::UprightRectangle::_y.
Referenced by OSDL::Video::TwoDimensional::Text::Font::blitLatin1MultiLineText(), OSDL::Video::TwoDimensional::Widget::drawDecorations(), and redrawBackBuffer().
Surface & BackBufferedWidget::getWidgetRenderTarget | ( | ) | [inherited] |
Returns the surface that should be targeted by widgets having to blit their renderings to their container.
For back-buffered widgets, the render target is not the instance itself (it would modify the private back-buffer of this widget) but the overall owned surface: subwidgets should only be blitted into this overall surface, and should not affect the back-buffer.
Reimplemented from OSDL::Video::Surface.
Definition at line 375 of file OSDLBackBufferedWidget.cc.
References OSDL::Video::TwoDimensional::BackBufferedWidget::_overallSurface.
Referenced by OSDL::Video::TwoDimensional::BackBufferedWidget::redraw().
Length Surface::getWidth | ( | ) | const [virtual, inherited] |
Returns the width of this Surface.
Reimplemented from OSDL::Video::TwoDimensional::UprightRectangle.
Definition at line 1148 of file OSDLSurface.cc.
References OSDL::Video::Surface::_surface.
Referenced by OSDL::Video::Surface::centerMousePosition(), OSDL::Video::Surface::clone(), OSDL::Video::Surface::createColorReducedSurfaceFor(), OSDL::Video::Surface::displayAtCenter(), OSDL::Video::Surface::displayAtCenterWithAlpha(), OSDL::Video::Surface::displayAtCenterWithFadeIn(), OSDL::Video::Surface::displayAtCenterWithFadeOut(), OSDL::Video::Surface::displayCenteredHorizontallyAt(), OSDL::Video::Surface::displayCenteredHorizontallyWithAlphaAt(), OSDL::Video::Surface::displayInFullscreen(), OSDL::Video::Surface::displayInFullscreenSizeWithAlphaAt(), OSDL::Video::Surface::displayInFullscreenWithAlpha(), OSDL::Video::TwoDimensional::Widget::drawDecorations(), OSDL::Video::Surface::drawEdges(), OSDL::Video::Surface::drawGrid(), OSDL::Video::Surface::fill(), OSDL::Video::Surface::getContentArea(), OSDL::Video::Surface::guessColorKey(), OSDL::Video::TwoDimensional::Image::LoadIcon(), redrawBackBuffer(), OSDL::Video::TwoDimensional::Text::Font::renderLatin1MultiLineText(), OSDL::Video::TwoDimensional::Text::Font::renderLatin1TextWithWordCached(), OSDL::Video::TwoDimensional::Widget::resize(), OSDL::Video::Surface::resize(), OSDL::Video::TwoDimensional::Image::SavePNG(), OSDL::Video::Surface::setAlphaForColor(), OSDL::Video::TwoDimensional::Widget::setHeight(), OSDL::Video::Surface::setHeight(), OSDL::Video::VideoModule::setMode(), OSDL::Video::OpenGL::GLTexture::setUpInternalSurfaceFrom(), OSDL::Video::TwoDimensional::Widget::toString(), OSDL::Video::Surface::toString(), OSDL::Video::TwoDimensional::Widget::updateClientArea(), and updateClientArea().
PixelColor Surface::guessColorKey | ( | ) | const [inherited] |
Returns the pixel color of the colorkey of this surface, as attempted to be guessed from the actual pixel colors (alpha not taken into account).
This is done by checking the corner pixels, supposedly set to this colorkey.
VideoException | if no colorkey could be guessed. |
Definition at line 676 of file OSDLSurface.cc.
References OSDL::Video::Pixels::areEqual(), OSDL::Video::Surface::getHeight(), OSDL::Video::Surface::getPixelColorAt(), and OSDL::Video::Surface::getWidth().
Referenced by OSDL::Video::Surface::createColorReducedSurfaceFor(), OSDL::Video::Surface::getContentArea(), and OSDL::Video::Surface::guessColorKeyDefinition().
ColorDefinition Surface::guessColorKeyDefinition | ( | ) | const [inherited] |
Returns the color definition of the colorkey of this surface, as attempted to be guessed from the actual pixel colors (alpha not taken into account).
This is done by checking the corner pixels, supposedly set to this colorkey.
VideoException | if no colorkey could be guessed. |
Definition at line 666 of file OSDLSurface.cc.
References OSDL::Video::Pixels::convertPixelColorToColorDefinition(), OSDL::Video::Surface::getPixelFormat(), and OSDL::Video::Surface::guessColorKey().
void Surface::inconsistencyDetected | ( | const std::string & | message | ) | const [protected, virtual, inherited] |
Triggered when an abnormal inconsistency is detected between OSDL's surface state and its back-end counterpart.
Definition at line 4200 of file OSDLSurface.cc.
Referenced by OSDL::Video::Surface::flush().
static std::string OSDL::Video::Surface::InterpretFlags | ( | Ceylan::Flags | flags | ) | [static, inherited] |
Outputs a textual description of the given surface flags.
These flags are interpreted as surface flags only.
flags | the surface video settings to interpret. |
Referenced by OSDL::Video::Surface::toString().
bool Widget::isDecorated | ( | ) | const [protected, virtual, inherited] |
Tells whether this widget is decorated.
Definition at line 710 of file OSDLWidget.cc.
References OSDL::Video::TwoDimensional::Widget::_decorated.
bool Surface::isInternalSurfaceAvailable | ( | ) | const [virtual, inherited] |
Tells whether the internal SDL surface is void or not.
Definition at line 3399 of file OSDLSurface.cc.
References OSDL::Video::Surface::_surface.
Referenced by OSDL::Video::TwoDimensional::Image::Load(), OSDL::Video::TwoDimensional::Image::LoadBMP(), OSDL::Video::TwoDimensional::Image::LoadGIF(), OSDL::Video::TwoDimensional::Image::LoadJPG(), OSDL::Video::TwoDimensional::Image::LoadLBM(), OSDL::Video::TwoDimensional::Image::LoadPCX(), OSDL::Video::TwoDimensional::Image::LoadPNG(), OSDL::Video::TwoDimensional::Image::LoadPNM(), OSDL::Video::TwoDimensional::Image::LoadTGA(), and OSDL::Video::TwoDimensional::Image::LoadXPM().
void Surface::loadBMP | ( | const std::string & | filename, | |
bool | blitOnly = false , |
|||
bool | convertToDisplayFormat = true , |
|||
bool | convertWithAlpha = true | |||
) | [virtual, inherited] |
Loads a BMP image from specified file into this surface.
targetSurface | the surface that should correspond to the loaded image. | |
filename | the name of the BMP file. | |
blitOnly | tells whether the loaded image surface should only be blitted into the supposed already existing internal surface and then be deallocated (if flag is true), or if this loaded surface should simply replace the former one (if flag is false). | |
convertToDisplayFormat | tells whether this loaded image should have its format converted to the screen's format, in order to offer faster blits if ever that surface was to be blitted multiple times to the screen (one-time-for-all conversion). | |
convertWithAlpha | if the conversion to screen format is selected (convertToDisplayFormat is true), tells whether the converted surface should also have an alpha channel. |
Should be inlined.
Definition at line 3024 of file OSDLSurface.cc.
References OSDL::Video::TwoDimensional::Image::LoadBMP().
void Surface::loadGIF | ( | const std::string & | filename, | |
bool | blitOnly = false , |
|||
bool | convertToDisplayFormat = true , |
|||
bool | convertWithAlpha = true | |||
) | [virtual, inherited] |
Loads a GIF image from specified file into this surface.
targetSurface | the surface that should correspond to the loaded image. | |
filename | the name of the GIF file. | |
blitOnly | tells whether the loaded image surface should only be blitted into the supposed already existing internal surface and then be deallocated (if flag is true), or if this loaded surface should simply replace the former one (if flag is false). | |
convertToDisplayFormat | tells whether this loaded image should have its format converted to the screen's format, in order to offer faster blits if ever that surface was to be blitted multiple times to the screen (one-time-for-all conversion). | |
convertWithAlpha | if the conversion to screen format is selected (convertToDisplayFormat is true), tells whether the converted surface should also have an alpha channel. |
Should be inlined.
Definition at line 3035 of file OSDLSurface.cc.
References OSDL::Video::TwoDimensional::Image::LoadGIF().
Surface & Surface::LoadImage | ( | const std::string & | filename, | |
bool | convertToDisplayFormat = true , |
|||
bool | convertWithAlpha = true | |||
) | [static, inherited] |
Surface factory: creates a new Surface instance from specified image file.
filename | the file from which the image will be loaded | |
convertToDisplayFormat | tells whether this loaded image should have its format converted to the screen's format, in order to offer faster blits if ever that surface was to be blitted multiple times to the screen (one-time-for-all conversion). | |
convertWithAlpha | if the conversion to screen format is selected (convertToDisplayFormat is true), tells whether the converted surface should also have an alpha channel. |
Definition at line 3923 of file OSDLSurface.cc.
References OSDL::Video::Surface::loadImage(), and OSDL::Video::Surface::Surface().
Referenced by OSDL::Video::TwoDimensional::Image::load(), OSDL::Video::OpenGL::GLTexture::load(), and OSDL::Video::TwoDimensional::Image::LoadIcon().
void Surface::loadImage | ( | const std::string & | filename, | |
bool | blitOnly = false , |
|||
bool | convertToDisplayFormat = true , |
|||
bool | convertWithAlpha = true | |||
) | [virtual, inherited] |
Loads an image, whose format will be auto-detected, from specified file, into this surface.
This is a Surface factory.
targetSurface | the surface that should correspond to the loaded image. | |
filename | the name of the image file. | |
blitOnly | tells whether the loaded image surface should only be blitted into the supposed already existing internal surface and then be deallocated (if flag is true), or if this loaded surface should simply replace the former one (if flag is false). | |
convertToDisplayFormat | tells whether this loaded image should have its format converted to the screen's format, in order to offer faster blits if ever that surface was to be blitted multiple times to the screen (one-time-for-all conversion). | |
convertWithAlpha | if the conversion to screen format is selected (convertToDisplayFormat is true), tells whether the converted surface should also have an alpha channel. |
Should be inlined.
Definition at line 2991 of file OSDLSurface.cc.
References OSDL::Video::TwoDimensional::Image::Load().
Referenced by OSDL::Video::Surface::LoadImage().
Surface & Surface::LoadJPG | ( | const std::string & | filename, | |
bool | convertToDisplayFormat = true , |
|||
bool | convertWithAlpha = true | |||
) | [static, inherited] |
Surface factory: creates a new Surface instance from specified JPG image file.
filename | the file from which the image will be loaded | |
convertToDisplayFormat | tells whether this loaded image should have its format converted to the screen's format, in order to offer faster blits if ever that surface was to be blitted multiple times to the screen (one-time-for-all conversion). | |
convertWithAlpha | if the conversion to screen format is selected (convertToDisplayFormat is true), tells whether the converted surface should also have an alpha channel. |
Definition at line 3981 of file OSDLSurface.cc.
References OSDL::Video::Surface::loadJPG(), and OSDL::Video::Surface::Surface().
Referenced by OSDL::Video::Surface::loadJPG().
void Surface::loadJPG | ( | const std::string & | filename, | |
bool | blitOnly = false , |
|||
bool | convertToDisplayFormat = true , |
|||
bool | convertWithAlpha = true | |||
) | [virtual, inherited] |
Loads a JPEG image from specified file into this surface.
targetSurface | the surface that should correspond to the loaded image. | |
filename | the name of the JPEG file. | |
blitOnly | tells whether the loaded image surface should only be blitted into the supposed already existing internal surface and then be deallocated (if flag is true), or if this loaded surface should simply replace the former one (if flag is false). | |
convertToDisplayFormat | tells whether this loaded image should have its format converted to the screen's format, in order to offer faster blits if ever that surface was to be blitted multiple times to the screen (one-time-for-all conversion). | |
convertWithAlpha | if the conversion to screen format is selected (convertToDisplayFormat is true), tells whether the converted surface should also have an alpha channel. |
Should be inlined.
Definition at line 3002 of file OSDLSurface.cc.
References OSDL::Video::Surface::LoadJPG().
Referenced by OSDL::Video::Surface::LoadJPG().
void Surface::loadLBM | ( | const std::string & | filename, | |
bool | blitOnly = false , |
|||
bool | convertToDisplayFormat = true , |
|||
bool | convertWithAlpha = true | |||
) | [virtual, inherited] |
Loads a LBM image from specified file into this surface.
targetSurface | the surface that should correspond to the loaded image. | |
filename | the name of the LBM file. | |
blitOnly | tells whether the loaded image surface should only be blitted into the supposed already existing internal surface and then be deallocated (if flag is true), or if this loaded surface should simply replace the former one (if flag is false). | |
convertToDisplayFormat | tells whether this loaded image should have its format converted to the screen's format, in order to offer faster blits if ever that surface was to be blitted multiple times to the screen (one-time-for-all conversion). | |
convertWithAlpha | if the conversion to screen format is selected (convertToDisplayFormat is true), tells whether the converted surface should also have an alpha channel. |
Should be inlined.
Definition at line 3046 of file OSDLSurface.cc.
References OSDL::Video::TwoDimensional::Image::LoadLBM().
void Surface::loadPCX | ( | const std::string & | filename, | |
bool | blitOnly = false , |
|||
bool | convertToDisplayFormat = true , |
|||
bool | convertWithAlpha = true | |||
) | [virtual, inherited] |
Loads a PCX image from specified file into this surface.
targetSurface | the surface that should correspond to the loaded image. | |
filename | the name of the PCX file. | |
blitOnly | tells whether the loaded image surface should only be blitted into the supposed already existing internal surface and then be deallocated (if flag is true), or if this loaded surface should simply replace the former one (if flag is false). | |
convertToDisplayFormat | tells whether this loaded image should have its format converted to the screen's format, in order to offer faster blits if ever that surface was to be blitted multiple times to the screen (one-time-for-all conversion). | |
convertWithAlpha | if the conversion to screen format is selected (convertToDisplayFormat is true), tells whether the converted surface should also have an alpha channel. |
Should be inlined.
Definition at line 3057 of file OSDLSurface.cc.
References OSDL::Video::TwoDimensional::Image::LoadPCX().
Surface & Surface::LoadPNG | ( | const std::string & | filename, | |
bool | convertToDisplayFormat = true , |
|||
bool | convertWithAlpha = true | |||
) | [static, inherited] |
Surface factory: creates a new Surface instance from specified PNG image file.
filename | the file from which the image will be loaded | |
convertToDisplayFormat | tells whether this loaded image should have its format converted to the screen's format, in order to offer faster blits if ever that surface was to be blitted multiple times to the screen (one-time-for-all conversion). | |
convertWithAlpha | if the conversion to screen format is selected (convertToDisplayFormat is true), tells whether the converted surface should also have an alpha channel. |
Definition at line 3958 of file OSDLSurface.cc.
References OSDL::Video::Surface::loadPNG(), and OSDL::Video::Surface::Surface().
Referenced by OSDL::Video::Surface::loadPNG().
void Surface::loadPNG | ( | const std::string & | filename, | |
bool | blitOnly = false , |
|||
bool | convertToDisplayFormat = true , |
|||
bool | convertWithAlpha = true | |||
) | [virtual, inherited] |
Loads a PNG image from specified file into this surface.
targetSurface | the surface that should correspond to the loaded image. | |
filename | the name of the PNG file. | |
blitOnly | tells whether the loaded image surface should only be blitted into the supposed already existing internal surface and then be deallocated (if flag is true), or if this loaded surface should simply replace the former one (if flag is false). | |
convertToDisplayFormat | tells whether this loaded image should have its format converted to the screen's format, in order to offer faster blits if ever that surface was to be blitted multiple times to the screen (one-time-for-all conversion). | |
convertWithAlpha | if the conversion to screen format is selected (convertToDisplayFormat is true), tells whether the converted surface should also have an alpha channel. |
Should be inlined.
Definition at line 3013 of file OSDLSurface.cc.
References OSDL::Video::Surface::LoadPNG().
Referenced by OSDL::Video::Surface::LoadPNG().
void Surface::loadPNM | ( | const std::string & | filename, | |
bool | blitOnly = false , |
|||
bool | convertToDisplayFormat = true , |
|||
bool | convertWithAlpha = true | |||
) | [virtual, inherited] |
Loads a PNM image from specified file into this surface.
targetSurface | the surface that should correspond to the loaded image. | |
filename | the name of the PNM file. | |
blitOnly | tells whether the loaded image surface should only be blitted into the supposed already existing internal surface and then be deallocated (if flag is true), or if this loaded surface should simply replace the former one (if flag is false). | |
convertToDisplayFormat | tells whether this loaded image should have its format converted to the screen's format, in order to offer faster blits if ever that surface was to be blitted multiple times to the screen (one-time-for-all conversion). | |
convertWithAlpha | if the conversion to screen format is selected (convertToDisplayFormat is true), tells whether the converted surface should also have an alpha channel. |
Should be inlined.
Definition at line 3068 of file OSDLSurface.cc.
References OSDL::Video::TwoDimensional::Image::LoadPNM().
void Surface::loadTGA | ( | const std::string & | filename, | |
bool | blitOnly = false , |
|||
bool | convertToDisplayFormat = true , |
|||
bool | convertWithAlpha = true | |||
) | [virtual, inherited] |
Loads a TGA image from specified file into this surface.
targetSurface | the surface that should correspond to the loaded image. | |
filename | the name of the TGA file. | |
blitOnly | tells whether the loaded image surface should only be blitted into the supposed already existing internal surface and then be deallocated (if flag is true), or if this loaded surface should simply replace the former one (if flag is false). | |
convertToDisplayFormat | tells whether this loaded image should have its format converted to the screen's format, in order to offer faster blits if ever that surface was to be blitted multiple times to the screen (one-time-for-all conversion). | |
convertWithAlpha | if the conversion to screen format is selected (convertToDisplayFormat is true), tells whether the converted surface should also have an alpha channel. |
Should be inlined.
Definition at line 3079 of file OSDLSurface.cc.
References OSDL::Video::TwoDimensional::Image::LoadTGA().
void Surface::loadXPM | ( | const std::string & | filename, | |
bool | blitOnly = false , |
|||
bool | convertToDisplayFormat = true , |
|||
bool | convertWithAlpha = true | |||
) | [virtual, inherited] |
Loads a XPM image from specified file into this surface.
targetSurface | the surface that should correspond to the loaded image. | |
filename | the name of the XPM file. | |
blitOnly | tells whether the loaded image surface should only be blitted into the supposed already existing internal surface and then be deallocated (if flag is true), or if this loaded surface should simply replace the former one (if flag is false). | |
convertToDisplayFormat | tells whether this loaded image should have its format converted to the screen's format, in order to offer faster blits if ever that surface was to be blitted multiple times to the screen (one-time-for-all conversion). | |
convertWithAlpha | if the conversion to screen format is selected (convertToDisplayFormat is true), tells whether the converted surface should also have an alpha channel. |
Should be inlined.
Definition at line 3090 of file OSDLSurface.cc.
References OSDL::Video::TwoDimensional::Image::LoadXPM().
bool Surface::mustBeLocked | ( | ) | const [virtual, inherited] |
Tells whether this surface has to be locked before modifying it.
When using a surface, in general there is no need to use this method because the lock/unlock methods take care of that.
This method cannot be inlined since it is inherited.
Definition at line 3524 of file OSDLSurface.cc.
References OSDL::Video::Surface::_surface.
Referenced by OSDL::Video::Pixels::putPixelColor().
TextWidget& OSDL::Video::TwoDimensional::TextWidget::operator= | ( | const TextWidget & | source | ) | [private] |
Assignment operator made private to ensure that it will never be called.
The compiler should complain whenever this undefined operator is called, implicitly or not.
void Surface::postLock | ( | ) | [protected, virtual, inherited] |
Effective locking of the surface.
Nevertheless, only lock/unlock pair should be used by user programs.
Definition at line 3560 of file OSDLSurface.cc.
References OSDL::Video::Surface::_surface.
void Surface::preUnlock | ( | ) | [protected, virtual, inherited] |
Effective unlocking of the surface.
Nevertheless, only lock/unlock pair should be used by user programs.
Definition at line 3542 of file OSDLSurface.cc.
References OSDL::Video::Surface::_surface.
virtual bool OSDL::Video::Surface::printText | ( | const std::string & | text, | |
Coordinate | x, | |||
Coordinate | y, | |||
Pixels::ColorDefinition | colorDef = Pixels::White | |||
) | [virtual, inherited] |
Prints specified string on this surface, with specified color, taking as upper left corner specified coordinates.
Basic font will be used.
bool Surface::printText | ( | const std::string & | text, | |
Coordinate | x, | |||
Coordinate | y, | |||
Pixels::ColorElement | red, | |||
Pixels::ColorElement | green, | |||
Pixels::ColorElement | blue, | |||
Pixels::ColorElement | alpha = Pixels::AlphaOpaque | |||
) | [virtual, inherited] |
Prints specified string on this surface, with specified color, taking as upper left corner specified coordinates.
Basic font will be used.
Definition at line 1922 of file OSDLSurface.cc.
References OSDL::Video::TwoDimensional::Text::printBasic().
Referenced by OSDL::Video::TwoDimensional::Widget::drawDecorations().
virtual void OSDL::Video::Surface::putColorDefinitionAt | ( | Coordinate | x, | |
Coordinate | y, | |||
Pixels::ColorDefinition | colorDef, | |||
bool | blending = true , |
|||
bool | clipping = true , |
|||
bool | locking = false | |||
) | [virtual, inherited] |
Sets the pixel at [x;y] of this surface to the given color, specified as a color definition (set of RGBA coordinates).
x | the abscissa of the point to change. | |
y | the ordinate of the point to change. | |
colorDef | the RGBA color definition of the put pixel. | |
blending | tells whether the alpha channel must be taken into account, resulting to alpha blending with the destination pixel. If false, the exact specified color will be put in target pixel, instead of being blended with it. | |
clipping | tells whether point location is checked against surface bounds. If clipping is activated and the pixel is outside, nothing is done. | |
locking | tells whether this primitive should take care of locking / unlocking the surface (not recommended on a per pixel basis because of lock overhead) |
VideoException | if a problem occurs with a lock operation. |
Referenced by OSDL::Video::Surface::setAlphaForColor().
virtual void OSDL::Video::Surface::putPixelColorAt | ( | Coordinate | x, | |
Coordinate | y, | |||
Pixels::PixelColor | convertedColor, | |||
Pixels::ColorElement | alpha = Pixels::AlphaOpaque , |
|||
bool | blending = true , |
|||
bool | clipping = true , |
|||
bool | locking = false | |||
) | [virtual, inherited] |
Sets the pixel at [x;y] of this surface to the given color, specified as an already converted RGBA color.
alpha | the alpha coordinate of the pixel to be put with full precision: the alpha encoded in the converted color may not be reliable. | |
blending | tells whether the alpha channel must be taken into account, resulting to alpha blending with the destination pixel. If false, the exact specified color will be put in target pixel, instead of being blended with it. | |
clipping | tells whether point location is checked against surface bounds. If clipping is activated and the pixel is outside, nothing is done. | |
locking | tells whether this primitive should take care of locking / unlocking the surface (not recommended on a per pixel basis, because of lock overhead). |
Referenced by OSDL::Video::Surface::createColorReducedSurfaceFor().
virtual void OSDL::Video::Surface::putRGBAPixelAt | ( | Coordinate | x, | |
Coordinate | y, | |||
Pixels::ColorElement | red, | |||
Pixels::ColorElement | green, | |||
Pixels::ColorElement | blue, | |||
Pixels::ColorElement | alpha = Pixels::AlphaOpaque , |
|||
bool | blending = true , |
|||
bool | clipping = true , |
|||
bool | locking = false | |||
) | [virtual, inherited] |
Sets the pixel at [x;y] of this surface to the given color, specified as separate RGBA coordinates.
x | the abscissa of the point to change. | |
y | the ordinate of the point to change. | |
red | the red color coordinate. | |
green | the green color coordinate. | |
blue | the blue color coordinate. | |
alpha | the alpha color coordinate. | |
blending | tells whether the alpha channel must be taken into account, resulting to alpha blending with the destination pixel. If false, the exact specified color will be put in target pixel, instead of being blended with it. | |
clipping | tells whether point location is checked against surface bounds. If clipping is activated and the pixel is outside, nothing is done. | |
locking | tells whether this primitive should take $ care of locking / unlocking the surface (not recommended on a per pixel basis, because of lock overhead) |
VideoException | if a problem occurs with a lock operation. |
void Surface::putWidgetToBack | ( | TwoDimensional::Widget & | widget | ) | [virtual, inherited] |
Changes stacking inside this container surface so that specified widget is put to back.
VideoException | if the widget is not a registered one. |
Definition at line 3469 of file OSDLSurface.cc.
void Surface::putWidgetToFront | ( | TwoDimensional::Widget & | widget | ) | [virtual, inherited] |
Changes stacking inside this container surface so that specified widget is put to front.
VideoException | if the widget is not a registered one. |
Definition at line 3450 of file OSDLSurface.cc.
void BackBufferedWidget::redraw | ( | ) | [virtual, inherited] |
Redraws this widget, by updating itself (if necessary) and then updating its sub-widgets, by blitting all of them (this widget, then all sub-widgets from bottom to top) to the back-buffer and then blitting the resulting back-buffer in the parent container of this widget.
Reimplemented from OSDL::Video::TwoDimensional::Widget.
Definition at line 233 of file OSDLBackBufferedWidget.cc.
References OSDL::Video::TwoDimensional::BackBufferedWidget::_overallSurface, OSDL::Video::TwoDimensional::Widget::_upperLeftCorner, OSDL::Video::Surface::blitTo(), OSDL::Video::TwoDimensional::Widget::getContainer(), OSDL::Video::Surface::getRedrawState(), OSDL::Video::TwoDimensional::BackBufferedWidget::getWidgetRenderTarget(), and OSDL::Video::Pixels::toString().
void TextWidget::redrawBackBuffer | ( | ) | [virtual] |
Triggers the actual internal rendering.
Reimplemented from OSDL::Video::TwoDimensional::BackBufferedWidget.
Definition at line 195 of file OSDLTextWidget.cc.
References _backColorForRoundCorners, OSDL::Video::TwoDimensional::Widget::_baseColor, OSDL::Video::TwoDimensional::Widget::_clientArea, OSDL::Video::TwoDimensional::Widget::_ClientOffsetHeight, _currentIndex, OSDL::Video::TwoDimensional::Widget::_decorated, _edgeColor, _font, _justified, _minimumHeight, _quality, _roundOffset, _shape, _text, _textColor, OSDL::Video::TwoDimensional::Widget::_TitleBarOffsetOrdinate, _verticallyAligned, OSDL::Video::Surface::blitTo(), DefaultEdgeWidth, OSDL::Video::TwoDimensional::Widget::drawDecorations(), OSDL::Video::TwoDimensional::Widget::drawFundamentals(), OSDL::Video::TwoDimensional::UprightRectangle::drawWithRoundedCorners(), OSDL::Video::Surface::fill(), OSDL::Video::Surface::getHeight(), OSDL::Video::TwoDimensional::UprightRectangle::getHeight(), OSDL::Video::TwoDimensional::UprightRectangle::getUpperLeftAbscissa(), OSDL::Video::TwoDimensional::UprightRectangle::getUpperLeftOrdinate(), OSDL::Video::Surface::getWidth(), OSDL::Video::TwoDimensional::UprightRectangle::getWidth(), OSDL::Video::TwoDimensional::Text::Font::renderLatin1MultiLineText(), OSDL::Video::TwoDimensional::BackBufferedWidget::setBackBufferRedrawState(), OSDL::Video::TwoDimensional::Widget::setHeight(), SquareCorners, and OSDL::Video::Pixels::toString().
void BackBufferedWidget::redrawInternal | ( | ) | [virtual, inherited] |
This method manages this widget so that no useless internal rendering is performed.
If however the main surface has to be updated, then the overriden 'redrawBackBuffer' will be called.
Reimplemented from OSDL::Video::TwoDimensional::Widget.
Definition at line 278 of file OSDLBackBufferedWidget.cc.
References OSDL::Video::TwoDimensional::Widget::_baseColor, OSDL::Video::TwoDimensional::BackBufferedWidget::_overallSurface, OSDL::Video::Surface::blitTo(), OSDL::Video::TwoDimensional::Widget::Colorkey, OSDL::Video::Surface::fill(), OSDL::Video::TwoDimensional::BackBufferedWidget::getBackBufferRedrawState(), OSDL::Video::TwoDimensional::Widget::getBaseColorMode(), OSDL::Video::TwoDimensional::BackBufferedWidget::redrawBackBuffer(), OSDL::Video::TwoDimensional::Widget::setRedrawState(), and OSDL::Video::Pixels::toString().
void BackBufferedWidget::resize | ( | Length | newWidth, | |
Length | newHeight, | |||
bool | ignored = false | |||
) | [virtual, inherited] |
Resizes both this widget and its back-buffer so that their new dimensions are the specified ones.
If the new dimensions are the same as the current ones, then nothing special will be done, surfaces stay as they are. Otherwise, they will be resized and their content will be lost, replaced by a pure black surface. The 'needs redraw' attribute will be set to true, both for the widget itself and for its back-buffer, and the client area will be updated.
newWidth | the new width. | |
newHeight | the new height. | |
ignored | is ignored. |
Reimplemented from OSDL::Video::TwoDimensional::Widget.
Definition at line 129 of file OSDLBackBufferedWidget.cc.
References OSDL::Video::TwoDimensional::BackBufferedWidget::_overallSurface, OSDL::Video::Surface::resize(), and OSDL::Video::TwoDimensional::BackBufferedWidget::setBackBufferRedrawState().
Surface & Surface::rotoZoom | ( | Ceylan::Maths::AngleInDegrees | angle, | |
Ceylan::Maths::Real | abscissaZoomFactor, | |||
Ceylan::Maths::Real | ordinateZoomFactor, | |||
bool | antialiasing = true | |||
) | const [virtual, inherited] |
Returns a newly created surface, obtained from this surface after a rotation of given angle and zooms of given factors.
If, for this surface, pixel color is not 8 bit or 32 bit, then a 32-bit surface will be internally created and used for the rotozoom.
Ownership of the returned surface is transferred to the caller, who will have to deallocate it when finish with it.
The final rendering speed depends first on antialiasing being requested or not, then on resulting surface size.
A surface is returned instead of rotating this surface to avoid accumulating rounding errors when rotozooming multiple times the same image: better use a constant source surface from which rotozoomed ones are created with various angles and zoom factors than changing the same surface again and again.
angle | the angle of rotation, in degrees. | |
abscissaZoomFactor | the zoom factor to be applied on the abscissa axis. If negative, the surface is flipped against this axis. No antialiasing will be performed in this case. | |
ordinateZoomFactor | the zoom factor to be applied on the ordinate axis. If negative, the surface is flipped against this axis. No antialiasing will be performed in this case. | |
antialiasing | if true and if zoom factors are positive, requests antialiasing (fine and expensive interpolation). 8-bit surfaces will never be antialiased. |
Definition at line 2864 of file OSDLSurface.cc.
References OSDL::Video::Surface::_surface, and OSDL::Video::Surface::Surface().
Surface & Surface::rotoZoom | ( | Ceylan::Maths::AngleInDegrees | angle, | |
Ceylan::Maths::Real | zoomFactor, | |||
bool | antialiasing = true | |||
) | const [virtual, inherited] |
Returns a newly created surface, obtained from this surface after a rotation of given angle and a zoom of given factor.
If, for this surface, pixel color is not 8 bit or 32 bit, then a 32-bit surface will be internally created and used for the rotozoom.
Ownership of the returned surface is transferred to the caller, who will have to deallocate it when having finished with it.
The final rendering speed depends first on antialiasing being requested or not, then on resulting surface size.
A surface is returned instead of rotating this surface to avoid accumulating rounding errors when rotozooming multiple times the same image: better use a constant source surface from which rotozoomed ones are created with various angles and zoom factors than changing the same surface again and again.
angle | the angle of rotation, in degrees. | |
zoomFactor | the zoom factor to be applied on both surface dimensions. If negative, the surface is rotated of Pi before the angle is applied. No antialiasing will be performed in this case. | |
antialiasing | if true and if zoom factor is positive, requests antialiasing (fine and expensive interpolation). 8-bit surfaces will never be antialiased. |
Definition at line 2855 of file OSDLSurface.cc.
void Surface::saveBMP | ( | const std::string & | filename, | |
bool | overwrite = true | |||
) | [virtual, inherited] |
Saves the current content of this surface into a BMP file.
filename | the name of the BMP file to create (ex: 'screenshot.bmp') | |
overwrite | tells whether an existing file filename should be overwritten, or if an exception should be raised. |
This method cannot be 'const' since this surface may have to be locked in order to access the pixels that are to be saved.
Definition at line 3110 of file OSDLSurface.cc.
References OSDL::Video::Surface::_surface, and OSDL::Utils::getBackendLastError().
Referenced by OSDL::Video::VideoModule::makeBMPScreenshot().
void Surface::savePNG | ( | const std::string & | filename, | |
bool | overwrite = true | |||
) | [virtual, inherited] |
Saves the current content of this surface into a PNG file.
filename | the name of the PNG file to be created (ex: 'screenshot.png') | |
overwrite | tells whether an existing file filename should be overwritten, or if an exception should be raised. |
This method cannot be 'const' since this surface may have to be locked in order to access the pixels that are to be saved.
Definition at line 3101 of file OSDLSurface.cc.
References OSDL::Video::TwoDimensional::Image::SavePNG().
Referenced by OSDL::Video::TwoDimensional::UprightRectangle::drawWithRoundedCorners().
virtual void OSDL::Video::Surface::setAlpha | ( | Ceylan::Flags | flags, | |
Pixels::ColorElement | newAlpha | |||
) | [virtual, inherited] |
Adjusts the alpha properties of the surface: sets the per-surface alpha value and/or enables or disables alpha blending.
flags | can be an OR'd combination of the following two options, one of these options, or 0 (none): | |
newAlpha | is the per-surface alpha value. A surface needs not to have an alpha channel to use per-surface alpha, and blitting can still be accelerated with Surface::RLEColorkeyBlit. |
Referenced by OSDL::Video::OpenGL::GLTexture::setUpInternalSurfaceFrom().
bool Surface::setAlphaForColor | ( | Pixels::ColorDefinition | colorDef, | |
Pixels::ColorElement | newAlpha | |||
) | [virtual, inherited] |
Definition at line 1456 of file OSDLSurface.cc.
References OSDL::Video::Surface::AlphaBlendingBlit, OSDL::Video::Pixels::areEqual(), OSDL::Video::Surface::getColorDefinitionAt(), OSDL::Video::Surface::getFlags(), OSDL::Video::Surface::getHeight(), OSDL::Video::Surface::getWidth(), OSDL::Video::Surface::putColorDefinitionAt(), and OSDL::Video::Pixels::toString().
Referenced by OSDL::Video::TwoDimensional::drawDiscWithEdge().
void BackBufferedWidget::setBackBufferRedrawState | ( | bool | needsToBeRedrawn | ) | [protected, virtual, inherited] |
Sets the need for redraw state for the back-buffer.
Definition at line 404 of file OSDLBackBufferedWidget.cc.
References OSDL::Video::TwoDimensional::BackBufferedWidget::_needsBackBufferRedraw, OSDL::Video::TwoDimensional::BackBufferedWidget::getBackBufferRedrawState(), and OSDL::Video::TwoDimensional::Widget::setRedrawState().
Referenced by redrawBackBuffer(), OSDL::Video::TwoDimensional::BackBufferedWidget::redrawBackBuffer(), OSDL::Video::TwoDimensional::BackBufferedWidget::resize(), and OSDL::Video::TwoDimensional::BackBufferedWidget::setBaseColorMode().
void BackBufferedWidget::setBaseColorMode | ( | BaseColorMode | newBaseColorMode, | |
Pixels::ColorDefinition | newBaseColor | |||
) | [virtual, inherited] |
Sets the current base color mode and base color, for both surfaces (back-buffer and overall).
Based on previous values, only the necessary operations will be performed. For example, setting the same colorkey twice will activate the key only once.
newBaseColorMode | the new base color mode. | |
newBaseColor | the new base color. |
VideoException | if a change in color-keing failed. |
Reimplemented from OSDL::Video::TwoDimensional::Widget.
Definition at line 144 of file OSDLBackBufferedWidget.cc.
References OSDL::Video::TwoDimensional::Widget::_actualBaseColor, OSDL::Video::TwoDimensional::Widget::_baseColor, OSDL::Video::TwoDimensional::Widget::_baseColorMode, OSDL::Video::TwoDimensional::BackBufferedWidget::_overallSurface, OSDL::Video::Pixels::areEqual(), OSDL::Video::TwoDimensional::Widget::Colorkey, OSDL::Video::Surface::ColorkeyBlit, OSDL::Video::Pixels::convertColorDefinitionToPixelColor(), OSDL::Video::Surface::getPixelFormat(), OSDL::Video::TwoDimensional::Widget::NotInitialized, OSDL::Video::Surface::RLEColorkeyBlit, OSDL::Video::TwoDimensional::BackBufferedWidget::setBackBufferRedrawState(), and OSDL::Video::Surface::setColorKey().
Referenced by TextWidget().
void Surface::setBitsPerPixel | ( | BitsPerPixel | newBitsPerPixel | ) | [virtual, inherited] |
Sets this surface's color depth, bits per pixel.
Definition at line 1315 of file OSDLSurface.cc.
References OSDL::Video::Surface::_surface.
void Surface::setBytesPerPixel | ( | BytesPerPixel | newBytesPerPixel | ) | [virtual, inherited] |
Sets this surface's color depth, bytes per pixel.
Definition at line 1347 of file OSDLSurface.cc.
References OSDL::Video::Surface::_surface.
virtual void OSDL::Video::Surface::setClippingArea | ( | UprightRectangle & | newClippingArea | ) | [virtual, inherited] |
Sets this surface's clipping area, expressed thanks to an UprightRectangle, whose ownership is left to the caller.
Should not be confused with the actual area corresponding to this surface, which is another UprightRectangle.
virtual void OSDL::Video::Surface::setColorKey | ( | Ceylan::Flags | flags, | |
Pixels::ColorDefinition | keyColorDef | |||
) | [virtual, inherited] |
Sets the color key (transparent pixel) in a blittable surface, and enables or disables RLE blit acceleration.
RLE acceleration can substantially speed up blitting of images with large horizontal runs of transparent pixels (i.e. pixels that match the key value). The key must be defined accoring to the same pixel format as the surface.
flag | can be a OR'ed combination:
|
If flag is 0, this function clears any current color key.
keyColorDef | the color definition of the color key. |
VideoException | if the operation failed or is not supported. |
virtual void OSDL::Video::Surface::setColorKey | ( | Ceylan::Flags | flags, | |
Pixels::PixelColor | keyPixelColor | |||
) | [virtual, inherited] |
Sets the color key (transparent pixel) in a blittable surface, and enables or disables RLE blit acceleration.
RLE acceleration can substantially speed up blitting of images with large horizontal runs of transparent pixels (i.e. pixels that match the key value). The key must be defined accoring to the same pixel format as the surface.
flag | can be a OR'ed combination:
|
If flag is 0, this function clears any current color key.
keyPixelColor,the | pixel color of the key. Pixels::convertColorDefinitionToPixelColor is often useful for obtaining a correct value for the color key. |
Referenced by OSDL::Video::TwoDimensional::Text::FixedFont::basicRenderLatin1Glyph(), OSDL::Video::TwoDimensional::Text::Font::basicRenderLatin1Text(), OSDL::Video::TwoDimensional::Text::TrueTypeFont::basicRenderUnicodeGlyph(), OSDL::Video::TwoDimensional::UprightRectangle::drawWithRoundedCorners(), OSDL::Video::TwoDimensional::Image::LoadIcon(), OSDL::Video::TwoDimensional::Text::Font::renderLatin1MultiLineText(), OSDL::Video::TwoDimensional::Text::TrueTypeFont::renderLatin1Text(), OSDL::Video::TwoDimensional::Text::Font::renderLatin1TextWithWordCached(), OSDL::Video::TwoDimensional::Text::TrueTypeFont::renderUnicodeText(), OSDL::Video::TwoDimensional::Text::TrueTypeFont::renderUTF8Text(), OSDL::Video::Surface::resize(), OSDL::Video::TwoDimensional::Widget::setBaseColorMode(), and OSDL::Video::TwoDimensional::BackBufferedWidget::setBaseColorMode().
void Widget::setDecorationStatus | ( | bool | newDecorationStatus | ) | [virtual, inherited] |
Sets the current decoration status, so that this widget will have decorations or not after this method is called.
newDecorationStatus | the new decoration status. |
Definition at line 301 of file OSDLWidget.cc.
References OSDL::Video::TwoDimensional::Widget::_decorated.
void Surface::setDisplayType | ( | DisplayType | newDisplayType | ) | [virtual, inherited] |
Sets the new display type (back-buffer, screen, etc.
) of this surface.
Definition at line 573 of file OSDLSurface.cc.
References OSDL::Video::Surface::_displayType.
void Widget::SetEdgeColor | ( | Pixels::ColorDefinition | edgeColorDef | ) | [static, inherited] |
Sets the edge color for all new widgets.
edgeColorDef | the color definition of the edges. |
Definition at line 574 of file OSDLWidget.cc.
References OSDL::Video::TwoDimensional::Widget::_EdgeColor.
virtual void OSDL::Video::Surface::setFlags | ( | Ceylan::Flags | newFlags | ) | [virtual, inherited] |
Sets the flags caracterizing this surface.
void Widget::setHeight | ( | Length | newHeight | ) | [virtual, inherited] |
Sets the current height of this widget.
If the new height is different from the current one, triggers a resize that will invalidate this widget rendering: 'needs redraw' will be true afterwards.
The client area will be automatically adjusted.
Reimplemented from OSDL::Video::Surface.
Definition at line 185 of file OSDLWidget.cc.
References OSDL::Video::Surface::getWidth(), and OSDL::Video::TwoDimensional::Widget::resize().
Referenced by redrawBackBuffer(), and setText().
void UprightRectangle::setLowerRightAbscissa | ( | Coordinate | newAbscissa | ) | [virtual, inherited] |
Sets directly the abscissa of the lower right corner of this rectangle.
VideoException | if width or height would become negative. |
Definition at line 252 of file OSDLUprightRectangle.cc.
References OSDL::Video::TwoDimensional::UprightRectangle::_width, OSDL::Video::TwoDimensional::UprightRectangle::_x, OSDL::Video::TwoDimensional::UprightRectangle::toString(), and OSDL::Video::Pixels::toString().
void UprightRectangle::setLowerRightCorner | ( | Point2D & | newLowerRightCorner | ) | [virtual, inherited] |
Sets directly the lower right corner of this rectangle.
VideoException | if width or height would become negative. |
Definition at line 227 of file OSDLUprightRectangle.cc.
References OSDL::Video::TwoDimensional::UprightRectangle::_height, OSDL::Video::TwoDimensional::UprightRectangle::_width, OSDL::Video::TwoDimensional::UprightRectangle::_x, OSDL::Video::TwoDimensional::UprightRectangle::_y, OSDL::Video::TwoDimensional::Point2D::getX(), OSDL::Video::TwoDimensional::Point2D::getY(), OSDL::Video::TwoDimensional::UprightRectangle::toString(), and OSDL::Video::TwoDimensional::Point2D::toString().
void UprightRectangle::setLowerRightOrdinate | ( | Coordinate | newOrdinate | ) | [virtual, inherited] |
Sets directly the ordinate of the lower right corner of this rectangle.
VideoException | if width or height would become negative. |
Definition at line 276 of file OSDLUprightRectangle.cc.
References OSDL::Video::TwoDimensional::UprightRectangle::_height, OSDL::Video::TwoDimensional::UprightRectangle::_y, OSDL::Video::TwoDimensional::UprightRectangle::toString(), and OSDL::Video::Pixels::toString().
void Surface::setMousePosition | ( | Coordinate | newX = 0 , |
|
Coordinate | newY = 0 | |||
) | [virtual, inherited] |
Sets the position of the mouse cursor, by generating a mouse motion event.
VideoException | if the operation failed or is not supported. |
Definition at line 3498 of file OSDLSurface.cc.
References OSDL::Video::Surface::_displayType, and OSDL::Video::Surface::BackBuffer.
Referenced by OSDL::Video::Surface::centerMousePosition().
void Surface::setOffset | ( | Offset | offset | ) | [inline, protected, inherited] |
Sets this surface's offset.
Definition at line 4160 of file OSDLSurface.cc.
References OSDL::Video::Surface::_surface.
virtual bool OSDL::Video::Surface::setPalette | ( | const Palette & | newPalette, | |
ColorCount | startingColorIndex = 0 , |
|||
ColorCount | numberOfColors = 0 , |
|||
Ceylan::Flags | targetedPalettes = Palette::Logical|Palette::Physical | |||
) | [virtual, inherited] |
Sets this surface's palette thanks to specified one.
newPalette | the palette from which new color definitions should be copied (ownership not taken) | |
startingColorIndex | the color-definition index in newPalette from which color definitions will be taken. | |
numberOfColors | the number of colors that should be copied, starting from startingColorIndex. If zero, all remaining color definitions from newPalette will be taken. | |
targetedPalettes | a flag which tells whether logical palette, physical one or both (OR'ed) should be updated. |
VideoException | if the operation failed. |
Referenced by OSDL::Video::Surface::createColorReducedSurfaceFor().
void Surface::setPitch | ( | Pitch | newPitch | ) | [virtual, inherited] |
Sets this surface's pitch.
Definition at line 1135 of file OSDLSurface.cc.
References OSDL::Video::Surface::_surface.
void Surface::setPixelFormat | ( | Pixels::PixelFormat & | newFormat | ) | [virtual, inherited] |
Sets this surface's pixel format.
Definition at line 933 of file OSDLSurface.cc.
References OSDL::Video::Surface::_surface.
void Surface::setPixels | ( | void * | newPixels | ) | [virtual, inherited] |
Sets this surface's video buffer, i.e.
its whole set of pixels.
Definition at line 1379 of file OSDLSurface.cc.
References OSDL::Video::Surface::_surface.
void Widget::setRedrawState | ( | bool | needsToBeRedrawn | ) | [virtual, inherited] |
Sets redraw state.
Reimplemented from OSDL::Video::Surface.
Definition at line 382 of file OSDLWidget.cc.
References OSDL::Video::TwoDimensional::Widget::getContainer(), OSDL::Video::Surface::getRedrawState(), and OSDL::Video::Surface::setRedrawState().
Referenced by OSDL::Video::TwoDimensional::Widget::redrawInternal(), OSDL::Video::TwoDimensional::BackBufferedWidget::redrawInternal(), OSDL::Video::TwoDimensional::BackBufferedWidget::setBackBufferRedrawState(), and OSDL::Video::TwoDimensional::Widget::setBaseColorMode().
void Surface::setSDLSurface | ( | LowLevelSurface & | newSurface, | |
DisplayType | displayType = BackBuffer | |||
) | [virtual, inherited] |
Sets this surface so that it corresponds to the supplied SDL surface.
newSurface | the new surface to be managed | |
displayType | tells whether this new surface is a backbuffer or a screen surface. |
Definition at line 550 of file OSDLSurface.cc.
References OSDL::Video::Surface::_displayType, OSDL::Video::Surface::_surface, and OSDL::Video::Surface::flush().
Referenced by OSDL::Video::TwoDimensional::Image::Load(), OSDL::Video::TwoDimensional::Image::LoadBMP(), OSDL::Video::TwoDimensional::Image::LoadGIF(), OSDL::Video::TwoDimensional::Image::LoadJPG(), OSDL::Video::TwoDimensional::Image::LoadLBM(), OSDL::Video::TwoDimensional::Image::LoadPCX(), OSDL::Video::TwoDimensional::Image::LoadPNG(), OSDL::Video::TwoDimensional::Image::LoadPNM(), OSDL::Video::TwoDimensional::Image::LoadTGA(), and OSDL::Video::TwoDimensional::Image::LoadXPM().
void TextWidget::setText | ( | const std::string & | newText | ) | [virtual] |
Sets the new text this widget should render.
newText | the text that will be rendered, at least partially. |
Definition at line 163 of file OSDLTextWidget.cc.
References _maximumHeight, _text, OSDL::Video::TwoDimensional::Widget::setHeight(), and updateClientArea().
void UprightRectangle::setUpperLeftAbscissa | ( | Coordinate | newAbscissa | ) | [virtual, inherited] |
Sets directly the abscissa of the upper left corner of this rectangle.
Definition at line 185 of file OSDLUprightRectangle.cc.
References OSDL::Video::TwoDimensional::UprightRectangle::_x.
Referenced by OSDL::Video::TwoDimensional::UprightRectangle::drawWithRoundedCorners(), OSDL::Video::TwoDimensional::Widget::updateClientArea(), and updateClientArea().
void UprightRectangle::setUpperLeftCorner | ( | Point2D & | newUpperLeftCorner | ) | [virtual, inherited] |
Sets this UprightRectangle's upper left corner, width and height do not change.
Definition at line 166 of file OSDLUprightRectangle.cc.
References OSDL::Video::TwoDimensional::UprightRectangle::_x, OSDL::Video::TwoDimensional::UprightRectangle::_y, OSDL::Video::TwoDimensional::Point2D::getX(), and OSDL::Video::TwoDimensional::Point2D::getY().
void UprightRectangle::setUpperLeftOrdinate | ( | Coordinate | newOrdinate | ) | [virtual, inherited] |
Sets directly the ordinate of the upper left corner of this rectangle.
Definition at line 203 of file OSDLUprightRectangle.cc.
References OSDL::Video::TwoDimensional::UprightRectangle::_y.
Referenced by OSDL::Video::TwoDimensional::UprightRectangle::drawWithRoundedCorners(), OSDL::Video::TwoDimensional::Widget::updateClientArea(), and updateClientArea().
void Widget::setWidth | ( | Length | newWidth | ) | [virtual, inherited] |
Sets the current width of this widget.
If the new width is different from the current one, triggers a resize that will invalidate this widget rendering: 'needs redraw' will be true afterwards.
The client area will be automatically adjusted.
Reimplemented from OSDL::Video::Surface.
Definition at line 176 of file OSDLWidget.cc.
References OSDL::Video::Surface::getHeight(), and OSDL::Video::TwoDimensional::Widget::resize().
LowLevelRect * UprightRectangle::toLowLevelRect | ( | ) | const [virtual, inherited] |
Definition at line 801 of file OSDLUprightRectangle.cc.
References OSDL::Video::TwoDimensional::UprightRectangle::_x, OSDL::Video::TwoDimensional::UprightRectangle::_y, OSDL::Video::TwoDimensional::UprightRectangle::getHeight(), and OSDL::Video::TwoDimensional::UprightRectangle::getWidth().
Referenced by OSDL::Video::Surface::blitTo().
const string TextWidget::toString | ( | Ceylan::VerbosityLevels | level = Ceylan::high |
) | const [virtual] |
Returns an user-friendly description of the state of this object.
level | the requested verbosity level. |
Reimplemented from OSDL::Video::TwoDimensional::BackBufferedWidget.
Definition at line 441 of file OSDLTextWidget.cc.
References _edgeColor, _font, _justified, _maximumHeight, _minimumHeight, _quality, _shape, _text, _textColor, _verticallyAligned, OSDL::Video::TwoDimensional::Text::Font::Blended, OSDL::Video::Surface::getHeight(), RoundCorners, OSDL::Video::TwoDimensional::Text::Font::Shaded, OSDL::Video::TwoDimensional::Text::Font::Solid, SquareCorners, OSDL::Video::TwoDimensional::Text::Font::toString(), and OSDL::Video::Pixels::toString().
void Surface::update | ( | ) | [virtual, inherited] |
Updates the display with this surface, which will be automatically set in an up-to-date state if necessary, so that it is fully redrawn, including its widgets.
If it is a screen surface (either OpenGL or not), it will be updated in order to have the display match the surface buffer. Does nothing more if this surface is not a screen surface.
on hardware that does not support double-buffering, this is equivalent to calling the updateRectangle method with all arguments to zero.
VideoException | if the operation failed, including if this surface is not a screen surface. |
Definition at line 3136 of file OSDLSurface.cc.
References OSDL::Video::Surface::_displayType, OSDL::Video::Surface::_surface, OSDL::Video::Surface::_updateCount, OSDL::Video::Surface::BackBuffer, OSDL::Video::Surface::ClassicalScreenSurface, OSDL::Utils::getBackendLastError(), OSDL::Video::Surface::OpenGLScreenSurface, and OSDL::Video::Surface::redraw().
Referenced by OSDL::Video::Surface::displayAtCenterWithFadeIn(), and OSDL::Video::Surface::displayAtCenterWithFadeOut().
void TextWidget::updateClientArea | ( | ) | [protected, virtual] |
Updates client area with regard to current shape and decoration status.
Reimplemented from OSDL::Video::TwoDimensional::Widget.
Definition at line 545 of file OSDLTextWidget.cc.
References OSDL::Video::TwoDimensional::Widget::_clientArea, _roundOffset, _shape, OSDL::Video::TwoDimensional::UprightRectangle::computeRadiusForRoundRectangle(), DefaultEdgeWidth, OSDL::Video::Surface::getHeight(), OSDL::Video::Surface::getWidth(), OSDL::Video::TwoDimensional::UprightRectangle::setHeight(), OSDL::Video::TwoDimensional::UprightRectangle::setUpperLeftAbscissa(), OSDL::Video::TwoDimensional::UprightRectangle::setUpperLeftOrdinate(), OSDL::Video::TwoDimensional::UprightRectangle::setWidth(), and SquareCorners.
Referenced by setText(), and TextWidget().
void Widget::updateDecorationFlag | ( | ) | [protected, virtual, inherited] |
Updates the decoration flag, depending on the various services requested.
Definition at line 589 of file OSDLWidget.cc.
References OSDL::Video::TwoDimensional::Widget::_closable, OSDL::Video::TwoDimensional::Widget::_decorated, OSDL::Video::TwoDimensional::Widget::_draggable, OSDL::Video::TwoDimensional::Widget::_minMaximizable, OSDL::Video::TwoDimensional::Widget::_title, and OSDL::Video::TwoDimensional::Widget::_wrappable.
Referenced by OSDL::Video::TwoDimensional::Widget::Widget().
void Surface::updateRectangle | ( | Coordinate | x, | |
Coordinate | y, | |||
Length | width, | |||
Length | height | |||
) | [virtual, inherited] |
Updates the part of this surface corresponding to specified rectangle.
VideoException | if the operation failed, including if this surface is not a screen surface. |
Definition at line 3289 of file OSDLSurface.cc.
References OSDL::Video::Surface::_displayType, OSDL::Video::Surface::_surface, and OSDL::Video::Surface::BackBuffer.
virtual void OSDL::Video::Surface::updateRectangle | ( | const UprightRectangle & | rect | ) | [virtual, inherited] |
Updates the part of this surface corresponding to specified rectangle.
VideoException | if the operation failed, including if this surface is not a screen surface. |
virtual void OSDL::Video::Surface::updateRectangles | ( | const std::list< UprightRectangle * > & | listRects | ) | [virtual, inherited] |
Updates the part of this surface corresponding to the specified list of rectangles.
The rectangles are not automatically merged or checked for overlap. In general, the programmer can use his knowledge about his particular rectangles to merge them in an efficient way, to avoid overdraw.
VideoException | if the operation failed, including if this surface is not a screen surface. |
Surface & Surface::zoom | ( | Ceylan::Maths::Real | abscissaZoomFactor, | |
Ceylan::Maths::Real | ordinateZoomFactor, | |||
bool | antialiasing = true | |||
) | const [virtual, inherited] |
Returns a newly created surface, obtained from this surface after a zoom of given factors.
If, for this surface, pixel color is not 8 bit or 32 bit, then a 32-bit surface will be internally created and used for the zoom.
Ownership of the returned surface is transferred to the caller, who will have to deallocate it when having finished with it.
The final rendering speed depends first on antialiasing being requested or not, then on resulting surface size.
A surface is returned instead of zooming directly this surface to avoid accumulating rounding errors when zooming multiple times the same image: better use a constant source surface from which zoomed ones are created with various zoom factors than changing the same surface again and again.
abscissaZoomFactor | the zoom factor to be applied on the abscissa axis. If negative, the surface is flipped against this axis. No antialiasing will be performed in this case. | |
ordinateZoomFactor | the zoom factor to be applied on the ordinate axis. If negative, the surface is flipped against this axis. No antialiasing will be performed in this case. | |
antialiasing | if true and if zoom factors are positive, requests antialiasing (fine and expensive interpolation). 8-bit surfaces will never be antialiased. |
Definition at line 2822 of file OSDLSurface.cc.
References OSDL::Video::Surface::_surface, and OSDL::Video::Surface::Surface().
Referenced by OSDL::Video::Surface::resize().
Pixels::PixelColor OSDL::Video::TwoDimensional::Widget::_actualBaseColor [protected, inherited] |
The base color, converted to this widget current pixel format, inherited from container.
Definition at line 768 of file OSDLWidget.h.
Referenced by OSDL::Video::TwoDimensional::Widget::setBaseColorMode(), and OSDL::Video::TwoDimensional::BackBufferedWidget::setBaseColorMode().
Pixels::ColorDefinition OSDL::Video::TwoDimensional::TextWidget::_backColorForRoundCorners [protected] |
The background color, only for RoundCorners shape, since the basecolor is already used for the colorkey.
Definition at line 350 of file OSDLTextWidget.h.
Referenced by redrawBackBuffer(), and TextWidget().
Pixels::ColorDefinition OSDL::Video::TwoDimensional::Widget::_baseColor [protected, inherited] |
Stores the base color of this widget, which is either used as a background color or a colorkey, depending on '_baseColorMode'.
Definition at line 759 of file OSDLWidget.h.
Referenced by OSDL::Video::TwoDimensional::Widget::clean(), OSDL::Video::TwoDimensional::Widget::getBaseColor(), redrawBackBuffer(), OSDL::Video::TwoDimensional::BackBufferedWidget::redrawInternal(), OSDL::Video::TwoDimensional::Widget::setBaseColorMode(), OSDL::Video::TwoDimensional::BackBufferedWidget::setBaseColorMode(), and OSDL::Video::TwoDimensional::Widget::toString().
BaseColorMode OSDL::Video::TwoDimensional::Widget::_baseColorMode [protected, inherited] |
Tells whether a background color, color-keying or nothing special shall be used for this widget.
Definition at line 747 of file OSDLWidget.h.
Referenced by OSDL::Video::TwoDimensional::Widget::clean(), OSDL::Video::TwoDimensional::Widget::getBaseColorMode(), OSDL::Video::TwoDimensional::Widget::setBaseColorMode(), OSDL::Video::TwoDimensional::BackBufferedWidget::setBaseColorMode(), and OSDL::Video::TwoDimensional::Widget::toString().
UprightRectangle OSDL::Video::TwoDimensional::Widget::_clientArea [protected, inherited] |
The rectangular client area, defined in the referential of this widget.
This area is the one left for this widget specific renderings (ex: any decorations excluded).
Definition at line 659 of file OSDLWidget.h.
Referenced by OSDL::Video::TwoDimensional::Widget::getClientArea(), redrawBackBuffer(), OSDL::Video::TwoDimensional::Widget::toString(), OSDL::Video::TwoDimensional::Widget::updateClientArea(), and updateClientArea().
Length Widget::_ClientOffsetHeight = 1 [static, protected, inherited] |
Default height offset for client area relative to widget horizontal edges.
Definition at line 824 of file OSDLWidget.h.
Referenced by redrawBackBuffer(), and OSDL::Video::TwoDimensional::Widget::updateClientArea().
Length Widget::_ClientOffsetWidth = 2 [static, protected, inherited] |
Default width offset for client area relative to widget vertical edges.
Definition at line 813 of file OSDLWidget.h.
Referenced by OSDL::Video::TwoDimensional::Widget::updateClientArea().
bool OSDL::Video::TwoDimensional::Widget::_closable [protected, inherited] |
Tells whether this widget can be closed by the user.
Definition at line 724 of file OSDLWidget.h.
Referenced by OSDL::Video::TwoDimensional::Widget::toString(), and OSDL::Video::TwoDimensional::Widget::updateDecorationFlag().
The current index of text that could not fit in the last display, or zero if no text has been rendered yet.
Definition at line 396 of file OSDLTextWidget.h.
Referenced by getRenderIndex(), and redrawBackBuffer().
bool OSDL::Video::TwoDimensional::Widget::_decorated [protected, inherited] |
Tells whether this widget rendering should include decorations.
Definition at line 669 of file OSDLWidget.h.
Referenced by OSDL::Video::TwoDimensional::Widget::isDecorated(), redrawBackBuffer(), OSDL::Video::TwoDimensional::Widget::redrawInternal(), OSDL::Video::TwoDimensional::Widget::setDecorationStatus(), OSDL::Video::TwoDimensional::Widget::toString(), OSDL::Video::TwoDimensional::Widget::updateClientArea(), and OSDL::Video::TwoDimensional::Widget::updateDecorationFlag().
std::string Widget::_DefaultTitle = "(anonymous widget)" [static, protected, inherited] |
Default title to be used when a titleless widget has however to be rendered decorated.
Definition at line 860 of file OSDLWidget.h.
Referenced by OSDL::Video::TwoDimensional::Widget::drawDecorations().
DisplayType OSDL::Video::Surface::_displayType [protected, inherited] |
Tells what is the display type of this surface.
The display type has to be recorded since:
Definition at line 3815 of file OSDLSurface.h.
Referenced by OSDL::Video::Surface::clear(), OSDL::Video::Surface::flush(), OSDL::Video::Surface::getDisplayType(), OSDL::Video::Surface::setDisplayType(), OSDL::Video::Surface::setMousePosition(), OSDL::Video::Surface::setSDLSurface(), OSDL::Video::Surface::toString(), OSDL::Video::Surface::update(), OSDL::Video::Surface::updateRectangle(), and OSDL::Video::Surface::~Surface().
bool OSDL::Video::TwoDimensional::Widget::_draggable [protected, inherited] |
Tells whether this widget can be dragged by the user.
Definition at line 699 of file OSDLWidget.h.
Referenced by OSDL::Video::TwoDimensional::Widget::toString(), and OSDL::Video::TwoDimensional::Widget::updateDecorationFlag().
Pixels::ColorDefinition Widget::_EdgeColor = Pixels::Grey [static, protected, inherited] |
Color of widget edges.
Definition at line 782 of file OSDLWidget.h.
Referenced by OSDL::Video::TwoDimensional::Widget::drawDecorations(), OSDL::Video::TwoDimensional::Widget::drawFundamentals(), OSDL::Video::TwoDimensional::Widget::GetEdgeColor(), and OSDL::Video::TwoDimensional::Widget::SetEdgeColor().
The color of the edges of this text widget.
Definition at line 341 of file OSDLTextWidget.h.
Referenced by redrawBackBuffer(), TextWidget(), and toString().
Text::Font* OSDL::Video::TwoDimensional::TextWidget::_font [protected] |
The font which is to be used for text rendering.
Definition at line 371 of file OSDLTextWidget.h.
Referenced by redrawBackBuffer(), and toString().
bool OSDL::Video::TwoDimensional::Widget::_hasFocus [protected, inherited] |
Tells whether this widget has currently the focus (i.e.
is selected by the user).
Definition at line 735 of file OSDLWidget.h.
Referenced by OSDL::Video::TwoDimensional::Widget::toString().
bool OSDL::Video::TwoDimensional::TextWidget::_justified [protected] |
Tells whether the text should be justified.
Definition at line 380 of file OSDLTextWidget.h.
Referenced by redrawBackBuffer(), and toString().
The upper bound of the height of this widget.
Definition at line 328 of file OSDLTextWidget.h.
Referenced by setText(), and toString().
Tells whether the height of this widget should be smallest possible one.
Definition at line 323 of file OSDLTextWidget.h.
Referenced by redrawBackBuffer(), and toString().
bool OSDL::Video::TwoDimensional::Widget::_minMaximizable [protected, inherited] |
Tells whether this widget can be minimized and maximized by the user.
Definition at line 687 of file OSDLWidget.h.
Referenced by OSDL::Video::TwoDimensional::Widget::toString(), and OSDL::Video::TwoDimensional::Widget::updateDecorationFlag().
bool OSDL::Video::Surface::_mustBeLocked [protected, inherited] |
Tells whether this surface must be locked before modifying it.
Definition at line 3824 of file OSDLSurface.h.
Surface* OSDL::Video::TwoDimensional::BackBufferedWidget::_overallSurface [protected, inherited] |
The overall surface where this widget (thanks to the back-buffer) and all its sub-widget tree will be rendered.
Definition at line 345 of file OSDLBackBufferedWidget.h.
Referenced by OSDL::Video::TwoDimensional::BackBufferedWidget::BackBufferedWidget(), OSDL::Video::TwoDimensional::BackBufferedWidget::getWidgetRenderTarget(), OSDL::Video::TwoDimensional::BackBufferedWidget::redraw(), OSDL::Video::TwoDimensional::BackBufferedWidget::redrawInternal(), OSDL::Video::TwoDimensional::BackBufferedWidget::resize(), OSDL::Video::TwoDimensional::BackBufferedWidget::setBaseColorMode(), OSDL::Video::TwoDimensional::BackBufferedWidget::toString(), and OSDL::Video::TwoDimensional::BackBufferedWidget::~BackBufferedWidget().
Quality of text rendering.
Definition at line 386 of file OSDLTextWidget.h.
Referenced by redrawBackBuffer(), and toString().
Precomputation of the round offset associated with round corners.
Updated when client area itself updated, and reused afterwards.
Definition at line 362 of file OSDLTextWidget.h.
Referenced by redrawBackBuffer(), and updateClientArea().
Shape OSDL::Video::TwoDimensional::TextWidget::_shape [protected] |
Records the shape of this text widget.
Definition at line 333 of file OSDLTextWidget.h.
Referenced by redrawBackBuffer(), TextWidget(), toString(), and updateClientArea().
LowLevelSurface* OSDL::Video::Surface::_surface [protected, inherited] |
This internal structure also contains private fields not used here.
Definition at line 3800 of file OSDLSurface.h.
Referenced by OSDL::Video::Surface::clone(), OSDL::Video::Surface::convertToDisplay(), OSDL::Video::Surface::flipHorizontal(), OSDL::Video::Surface::flipVertical(), OSDL::Video::Surface::flush(), OSDL::Video::Surface::getBitsPerPixel(), OSDL::Video::Surface::getBytesPerPixel(), OSDL::Video::Surface::getClippingArea(), OSDL::Video::Surface::getFlags(), OSDL::Video::Surface::getHeight(), OSDL::Video::Surface::getOffset(), OSDL::Video::Surface::getPalette(), OSDL::Video::Surface::getPitch(), OSDL::Video::Surface::getPixelFormat(), OSDL::Video::Surface::getPixels(), OSDL::Video::Surface::getSDLSurface(), OSDL::Video::Surface::getSizeInMemory(), OSDL::Video::Surface::getWidth(), OSDL::Video::Surface::isInternalSurfaceAvailable(), OSDL::Video::Surface::mustBeLocked(), OSDL::Video::Surface::postLock(), OSDL::Video::Surface::preUnlock(), OSDL::Video::Surface::resize(), OSDL::Video::Surface::rotoZoom(), OSDL::Video::Surface::saveBMP(), OSDL::Video::Surface::setBitsPerPixel(), OSDL::Video::Surface::setBytesPerPixel(), OSDL::Video::Surface::setOffset(), OSDL::Video::Surface::setPitch(), OSDL::Video::Surface::setPixelFormat(), OSDL::Video::Surface::setPixels(), OSDL::Video::Surface::setSDLSurface(), OSDL::Video::Surface::toString(), OSDL::Video::Surface::update(), OSDL::Video::Surface::updateRectangle(), and OSDL::Video::Surface::zoom().
std::string OSDL::Video::TwoDimensional::TextWidget::_text [protected] |
The text which is to be displayed by this widget.
Definition at line 367 of file OSDLTextWidget.h.
Referenced by getText(), redrawBackBuffer(), setText(), and toString().
The color of rendered text in this widget.
Definition at line 337 of file OSDLTextWidget.h.
Referenced by redrawBackBuffer(), TextWidget(), and toString().
const Length TextWidget::_TextHeightOffset = 4 [static, protected] |
Vertical offset on both sides.
Definition at line 314 of file OSDLTextWidget.h.
const Length TextWidget::_TextWidthOffset = 4 [static, protected] |
Horizontal offset on both sides.
Definition at line 310 of file OSDLTextWidget.h.
std::string OSDL::Video::TwoDimensional::Widget::_title [protected, inherited] |
This Widget's title.
Definition at line 674 of file OSDLWidget.h.
Referenced by OSDL::Video::TwoDimensional::Widget::drawDecorations(), OSDL::Video::TwoDimensional::Widget::toString(), and OSDL::Video::TwoDimensional::Widget::updateDecorationFlag().
Coordinate Widget::_TitleBarOffsetOrdinate = 15 [static, protected, inherited] |
Default ordinate offset relative to widget upper left corner used to draw widget title bar.
Definition at line 851 of file OSDLWidget.h.
Referenced by OSDL::Video::TwoDimensional::Widget::drawDecorations(), redrawBackBuffer(), and OSDL::Video::TwoDimensional::Widget::updateClientArea().
Pixels::ColorDefinition Widget::_TitleColor = Pixels::Black [static, protected, inherited] |
Color of widget title.
Definition at line 786 of file OSDLWidget.h.
Referenced by OSDL::Video::TwoDimensional::Widget::drawDecorations().
Text::HorizontalAlignment Widget::_TitleHorizontalAlignment = Text::WidthCentered [static, protected, inherited] |
Defines how a widget title should be horizontally aligned (default: Center).
Definition at line 795 of file OSDLWidget.h.
Referenced by OSDL::Video::TwoDimensional::Widget::drawDecorations().
Coordinate Widget::_TitleOffsetAbscissa = 5 [static, protected, inherited] |
Default abscissa offset relative to widget upper left corner used to print widget title with left alignment.
Definition at line 834 of file OSDLWidget.h.
Referenced by OSDL::Video::TwoDimensional::Widget::drawDecorations().
Coordinate Widget::_TitleOffsetOrdinate = 5 [static, protected, inherited] |
Default ordinate offset relative to widget upper left corner used to print widget title.
Definition at line 842 of file OSDLWidget.h.
Referenced by OSDL::Video::TwoDimensional::Widget::drawDecorations().
Text::VerticalAlignment Widget::_TitleVerticalAlignment = Text::HeightCentered [static, protected, inherited] |
Defines how a widget title should be vertically aligned.
(default: Center).
Definition at line 804 of file OSDLWidget.h.
Referenced by OSDL::Video::TwoDimensional::Widget::drawDecorations().
UpdateCount OSDL::Video::Surface::_updateCount [protected, inherited] |
Counts the number of updates for this surface.
Definition at line 3835 of file OSDLSurface.h.
Referenced by OSDL::Video::Surface::getUpdateCount(), and OSDL::Video::Surface::update().
Point2D OSDL::Video::TwoDimensional::Widget::_upperLeftCorner [protected, inherited] |
This widget's upper left corner, relatively to its container.
Definition at line 647 of file OSDLWidget.h.
Referenced by OSDL::Video::TwoDimensional::Widget::redraw(), OSDL::Video::TwoDimensional::BackBufferedWidget::redraw(), and OSDL::Video::TwoDimensional::Widget::toString().
bool OSDL::Video::TwoDimensional::TextWidget::_verticallyAligned [protected] |
Tells whether the text should be vertically aligned.
Definition at line 376 of file OSDLTextWidget.h.
Referenced by redrawBackBuffer(), and toString().
bool OSDL::Video::TwoDimensional::Widget::_wrappable [protected, inherited] |
Tells whether this widget can be wrapped by the user, hiding the whole widget but its decoration.
Definition at line 712 of file OSDLWidget.h.
Referenced by OSDL::Video::TwoDimensional::Widget::toString(), and OSDL::Video::TwoDimensional::Widget::updateDecorationFlag().
Coordinate OSDL::Video::TwoDimensional::UprightRectangle::_x [protected, inherited] |
Upper left corner's abscissa (horizontal coordinate).
Definition at line 491 of file OSDLUprightRectangle.h.
Referenced by OSDL::Video::TwoDimensional::UprightRectangle::draw(), OSDL::Video::TwoDimensional::UprightRectangle::drawWithRoundedCorners(), OSDL::Video::Surface::fill(), OSDL::Video::TwoDimensional::UprightRectangle::getLowerRightAbscissa(), OSDL::Video::TwoDimensional::UprightRectangle::getLowerRightCorner(), OSDL::Video::TwoDimensional::UprightRectangle::getUpperLeftAbscissa(), OSDL::Video::TwoDimensional::UprightRectangle::getUpperLeftCorner(), operator==(), OSDL::Video::TwoDimensional::UprightRectangle::setLowerRightAbscissa(), OSDL::Video::TwoDimensional::UprightRectangle::setLowerRightCorner(), OSDL::Video::TwoDimensional::UprightRectangle::setUpperLeftAbscissa(), OSDL::Video::TwoDimensional::UprightRectangle::setUpperLeftCorner(), OSDL::Video::TwoDimensional::UprightRectangle::toLowLevelRect(), and OSDL::Video::TwoDimensional::UprightRectangle::toString().
Coordinate OSDL::Video::TwoDimensional::UprightRectangle::_y [protected, inherited] |
Upper left corner's ordinate (vertical coordinate).
Definition at line 495 of file OSDLUprightRectangle.h.
Referenced by OSDL::Video::TwoDimensional::UprightRectangle::draw(), OSDL::Video::TwoDimensional::UprightRectangle::drawWithRoundedCorners(), OSDL::Video::Surface::fill(), OSDL::Video::TwoDimensional::UprightRectangle::getLowerRightCorner(), OSDL::Video::TwoDimensional::UprightRectangle::getLowerRightOrdinate(), OSDL::Video::TwoDimensional::UprightRectangle::getUpperLeftCorner(), OSDL::Video::TwoDimensional::UprightRectangle::getUpperLeftOrdinate(), operator==(), OSDL::Video::TwoDimensional::UprightRectangle::setLowerRightCorner(), OSDL::Video::TwoDimensional::UprightRectangle::setLowerRightOrdinate(), OSDL::Video::TwoDimensional::UprightRectangle::setUpperLeftCorner(), OSDL::Video::TwoDimensional::UprightRectangle::setUpperLeftOrdinate(), OSDL::Video::TwoDimensional::UprightRectangle::toLowLevelRect(), and OSDL::Video::TwoDimensional::UprightRectangle::toString().
const Ceylan::Flags Surface::AlphaBlendingBlit = 0x00010000 [static, inherited] |
Indicates that a surface is to use alpha blending blits.
Definition at line 340 of file OSDLSurface.h.
Referenced by OSDL::Video::TwoDimensional::BackBufferedWidget::BackBufferedWidget(), OSDL::Video::TwoDimensional::drawDiscWithEdge(), OSDL::Video::TwoDimensional::UprightRectangle::drawWithRoundedCorners(), OSDL::Video::Surface::setAlphaForColor(), OSDL::Video::OpenGL::GLTexture::setUpInternalSurfaceFrom(), and OSDL::Video::TwoDimensional::Widget::Widget().
const Ceylan::Flags Surface::AnyPixelFormat = 0x10000000 [static, inherited] |
Indicates that a display surface may use any pixel format.
Definition at line 373 of file OSDLSurface.h.
const Ceylan::Flags Surface::AsynchronousBlit = 0x00000004 [static, inherited] |
Indicates that a surface should use asynchronous blits if possible.
Definition at line 308 of file OSDLSurface.h.
const Length Surface::captionAbscissaOffset = 5 [static, inherited] |
Offset used when printing caption in a container.
Definition at line 3702 of file OSDLSurface.h.
const Length Surface::captionOrdinateOffset = 10 [static, inherited] |
Offset used when printing caption in a container.
Definition at line 3706 of file OSDLSurface.h.
const Ceylan::Flags Surface::ColorkeyBlit = 0x00001000 [static, inherited] |
Indicates that a surface is to use colorkey blits.
Definition at line 326 of file OSDLSurface.h.
Referenced by OSDL::Video::TwoDimensional::Text::FixedFont::basicRenderLatin1Glyph(), OSDL::Video::TwoDimensional::Text::Font::basicRenderLatin1Text(), OSDL::Video::TwoDimensional::Text::TrueTypeFont::basicRenderUnicodeGlyph(), OSDL::Video::Surface::convertFromColorKeyToAlphaChannel(), OSDL::Video::TwoDimensional::UprightRectangle::drawWithRoundedCorners(), OSDL::Video::TwoDimensional::Image::LoadIcon(), OSDL::Video::TwoDimensional::Text::Font::renderLatin1MultiLineText(), OSDL::Video::TwoDimensional::Text::TrueTypeFont::renderLatin1Text(), OSDL::Video::TwoDimensional::Text::Font::renderLatin1TextWithWordCached(), OSDL::Video::TwoDimensional::Text::TrueTypeFont::renderUnicodeText(), OSDL::Video::TwoDimensional::Text::TrueTypeFont::renderUTF8Text(), OSDL::Video::Surface::resize(), OSDL::Video::TwoDimensional::Widget::setBaseColorMode(), and OSDL::Video::TwoDimensional::BackBufferedWidget::setBaseColorMode().
const Length TextWidget::DefaultEdgeWidth = 3 [static] |
The default edge width for the 'RoundCorners' shape:
Definition at line 93 of file OSDLTextWidget.h.
Referenced by redrawBackBuffer(), and updateClientArea().
const Ceylan::Flags Surface::DoubleBuffered = 0x40000000 [static, inherited] |
Indicates that a display surface is to be double buffered.
Definition at line 381 of file OSDLSurface.h.
const Ceylan::Flags Surface::ExclusivePalette = 0x20000000 [static, inherited] |
Indicates that a surface should have an exclusive palette.
Definition at line 313 of file OSDLSurface.h.
const Ceylan::Flags Surface::FullScreen = 0x80000000 [static, inherited] |
Indicates that a display surface is to be full screen, not windowed.
Definition at line 390 of file OSDLSurface.h.
const Length Surface::graphAbscissaOffset = 10 [static, inherited] |
Offset used when drawing curve in a container.
Definition at line 3693 of file OSDLSurface.h.
const Length Surface::graphOrdinateOffset = 15 [static, inherited] |
Offset used when drawing curve in a container.
Definition at line 3697 of file OSDLSurface.h.
const Ceylan::Flags Surface::Hardware = 0x00000001 [static, inherited] |
Indicates that a surface is to be stored in video memory.
Definition at line 299 of file OSDLSurface.h.
Referenced by OSDL::Video::TwoDimensional::Text::FixedFont::basicRenderLatin1Glyph(), OSDL::Video::TwoDimensional::Text::Font::basicRenderLatin1Text(), OSDL::Video::TwoDimensional::Text::TrueTypeFont::basicRenderUnicodeGlyph(), OSDL::Video::TwoDimensional::Text::Font::renderLatin1MultiLineText(), OSDL::Video::TwoDimensional::Text::TrueTypeFont::renderLatin1Text(), OSDL::Video::TwoDimensional::Text::Font::renderLatin1TextWithWordCached(), OSDL::Video::TwoDimensional::Text::TrueTypeFont::renderUnicodeText(), and OSDL::Video::TwoDimensional::Text::TrueTypeFont::renderUTF8Text().
const Ceylan::Flags Surface::HardwareAcceleratedBlit = 0x00000100 [static, inherited] |
Indicates that a surface is to use hardware-accelerated blits.
Definition at line 321 of file OSDLSurface.h.
const Ceylan::Flags Surface::OpenGL = 0x00000002 [static, inherited] |
Indicates that a display surface should have an OpenGL context.
Definition at line 399 of file OSDLSurface.h.
const Ceylan::Flags Surface::Preallocated = 0x01000000 [static, inherited] |
Indicates that a surface is to use preallocated memory.
Definition at line 345 of file OSDLSurface.h.
const Ceylan::Flags Surface::Resizable = 0x00000010 [static, inherited] |
Indicates that a display surface is to be resizable.
Definition at line 408 of file OSDLSurface.h.
const Ceylan::Flags Surface::RLEColorkeyBlit = 0x00004000 [static, inherited] |
Indicates that a surface is to use RLE-accelerated colorkey blits.
Definition at line 335 of file OSDLSurface.h.
Referenced by OSDL::Video::TwoDimensional::Text::FixedFont::basicRenderLatin1Glyph(), OSDL::Video::TwoDimensional::Text::Font::basicRenderLatin1Text(), OSDL::Video::TwoDimensional::Text::TrueTypeFont::basicRenderUnicodeGlyph(), OSDL::Video::TwoDimensional::UprightRectangle::drawWithRoundedCorners(), OSDL::Video::TwoDimensional::Text::Font::renderLatin1MultiLineText(), OSDL::Video::TwoDimensional::Text::TrueTypeFont::renderLatin1Text(), OSDL::Video::TwoDimensional::Text::Font::renderLatin1TextWithWordCached(), OSDL::Video::TwoDimensional::Text::TrueTypeFont::renderUnicodeText(), OSDL::Video::TwoDimensional::Text::TrueTypeFont::renderUTF8Text(), OSDL::Video::Surface::resize(), OSDL::Video::TwoDimensional::Widget::setBaseColorMode(), and OSDL::Video::TwoDimensional::BackBufferedWidget::setBaseColorMode().
const Ceylan::Flags Surface::RLEColorkeyBlitAvailable = 0x00002000 [static, inherited] |
Indicates that RLE colorkey blit is actually accelerated (read-only).
Definition at line 356 of file OSDLSurface.h.
const Ceylan::Flags Surface::Software = 0x00000000 [static, inherited] |
Indicates that a surface is to be stored in system memory.
Definition at line 294 of file OSDLSurface.h.
Referenced by OSDL::Video::Surface::createColorReducedSurfaceFor(), OSDL::Video::TwoDimensional::drawDiscWithEdge(), and OSDL::Video::TwoDimensional::UprightRectangle::drawWithRoundedCorners().