Public Member Functions | |
SWImage (const Common::String &filename, bool &result) | |
int | getWidth () const override |
Returns the width of the image in pixels. | |
int | getHeight () const override |
Returns the height of the image in pixels. | |
bool | blit (int posX=0, int posY=0, int flipping=Graphics::FLIP_NONE, Common::Rect *pPartRect=NULL, uint color=BS_ARGB(255, 255, 255, 255), int width=-1, int height=-1, RectangleList *updateRects=0) override |
renders the image in the framebuffer More... | |
bool | fill (const Common::Rect *fillRectPtr, uint color) override |
fills a rectangular section of the image with a color. More... | |
bool | setContent (const byte *pixeldata, uint size, uint offset, uint stride) override |
Fills the content of the image with pixel data. More... | |
uint | getPixel (int x, int y) override |
Reads out a pixel of the image. More... | |
bool | isBlitSource () const override |
Checks, if it is allowed to call BS_Image Blit(). More... | |
bool | isBlitTarget () const override |
Checks, if the BS_Image can be a target image for a Blit call. More... | |
bool | isScalingAllowed () const override |
Returns true, if the BS_Image is allowed to be scaled by a Blit() call. | |
bool | isFillingAllowed () const override |
Returns true, if the BS_Image is allowed to be filled by a Fill() call. | |
bool | isAlphaAllowed () const override |
Returns true, if the BS_Image is allowed to be displayed with an alpha value. | |
bool | isColorModulationAllowed () const override |
Return true, if the BS_Image is allowed to be displayed with color modulation by a Blit() call. | |
bool | isSetContentAllowed () const override |
Returns true, if the content of the BS_Image is allowed to be replaced by call of SetContent(). | |
Public Member Functions inherited from Sword25::Image | |
virtual bool | isSolid () const |
|
overridevirtual |
renders the image in the framebuffer
pDest | a pointer to the target image. In most cases this is the framebuffer. |
PosX | the position on the X-axis in the target image in pixels where the image is supposed to be rendered. The default value is 0. |
PosY | the position on the Y-axis in the target image in pixels where the image is supposed to be rendered. The default value is 0. |
Flipping | how the image should be flipped. The default value is Graphics::FLIP_NONE (no flipping) |
pSrcPartRect | Pointer on Common::Rect which specifies the section to be rendered. If the whole image has to be rendered the Pointer is NULL. This referes to the unflipped and unscaled image. The default value is NULL. |
Color | an ARGB color value, which determines the parameters for the color modulation und alpha blending. The alpha component of the color determines the alpha blending parameter (0 = no covering, 255 = full covering). The color components determines the color for color modulation. The default value is BS_ARGB(255, 255, 255, 255) (full covering, no color modulation). The macros BS_RGB and BS_ARGB can be used for the creation of the color value. |
Width | the output width of the screen section. The images will be scaled if the output width of the screen section differs from the image section. The value -1 determines that the image should not be scaled. The default value is -1. |
Width | the output height of the screen section. The images will be scaled if the output width of the screen section differs from the image section. The value -1 determines that the image should not be scaled. The default value is -1. |
Implements Sword25::Image.
|
overridevirtual |
fills a rectangular section of the image with a color.
pFillRect | Pointer on Common::Rect which specifies the section of the image which is supposed to be filled. If the whole image has to be filled this value is NULL. The default value is NULL. |
Color | the 32 Bit color value for filling the image section. |
Implements Sword25::Image.
|
overridevirtual |
Fills the content of the image with pixel data.
Pixeldata | a vector which cotains the pixel data. They must be present in the color format of the image and there must be enough data available for filling the whole image. |
Offset | the offset in Byte in Pixeldata-Vector on which the first pixel to write is located. The default value is 0. |
Stride | the distance in Byte between the end of line and the beginning of a new line in Pixeldata-Vector. The default value is 0. |
Implements Sword25::Image.
|
overridevirtual |
Reads out a pixel of the image.
X | the X-coordinate of the pixel. |
Y | the y-coordinate of the pixel. |
Implements Sword25::Image.
|
inlineoverridevirtual |
Checks, if it is allowed to call BS_Image Blit().
Implements Sword25::Image.
|
inlineoverridevirtual |
Checks, if the BS_Image can be a target image for a Blit call.
Implements Sword25::Image.