|
#include <CPngImage.h>

Public Types | |
| enum | CPatternDrawMode { PDM_UNDEFINED, PDM_TILE, PDM_STRETCH } |
| The way how the resized parts of image are drawn. More... | |
Public Member Functions | |
| void | cutTileDraw (int srcX, int srcY, int srcW, int srcH, int destX, int destY, int destW, int destH) |
| Draws a part of the image by cutting a corresponding source and tiling it in required area. | |
| void | cutStretchDraw (int srcX, int srcY, int srcW, int srcH, int destX, int destY, int destW, int destH) |
| Draws a part of the image by cutting a corresponding source and stretching it in required area. | |
| CPngImage (const CBuffer &imagedata) | |
| Constructor. | |
| CPngImage (const Fl_RGB_Image *image) | |
| Constructor. | |
| CPngImage (std::string fileName) | |
| Constructor. | |
| void | drawResized (int x, int y, int w, int h, int cornerZone, CPatternDrawMode drawMode, bool drawBackground) |
| Draws resized image. | |
| void | drawResized (int x, int y, int w, int h, int border[], CPatternDrawMode drawMode, bool drawBackground) |
| Draws resized image. | |
This class is used by SPTK themes
The way how the resized parts of image are drawn.
By resized parts I mean everything besides four corners. Corners are rectangles with the side of corner zone
| sptk::CPngImage::CPngImage | ( | const CBuffer & | imagedata | ) |
Constructor.
An object of the class contains it's own copy of the image data
| imagedata | const CBuffer&, PNG image data in memory buffer |
| sptk::CPngImage::CPngImage | ( | const Fl_RGB_Image * | image | ) |
Constructor.
An object of the class contains it's own copy of the image data
| image | Fl_RGB_Image*, RGB image data in memory buffer |
| sptk::CPngImage::CPngImage | ( | std::string | fileName | ) |
Constructor.
An object of the class contains it's own copy of the image data
| fileName | std::string, image file (.png) |
| void sptk::CPngImage::cutStretchDraw | ( | int | srcX, | |
| int | srcY, | |||
| int | srcW, | |||
| int | srcH, | |||
| int | destX, | |||
| int | destY, | |||
| int | destW, | |||
| int | destH | |||
| ) | [inline] |
Draws a part of the image by cutting a corresponding source and stretching it in required area.
| srcX | int, x-coordinate of the source fragment | |
| srcY | int, y-coordinate of the source fragment | |
| srcW | int, width of the source fragment | |
| srcH | int, height of the source fragment | |
| destX | int, x-coordinate of the destination fragment | |
| destY | int, y-coordinate of the destination fragment | |
| destW | int, width of the destination fragment | |
| destH | int, height of the destination fragment |
| void sptk::CPngImage::cutTileDraw | ( | int | srcX, | |
| int | srcY, | |||
| int | srcW, | |||
| int | srcH, | |||
| int | destX, | |||
| int | destY, | |||
| int | destW, | |||
| int | destH | |||
| ) | [inline] |
Draws a part of the image by cutting a corresponding source and tiling it in required area.
| srcX | int, x-coordinate of the source fragment | |
| srcY | int, y-coordinate of the source fragment | |
| srcW | int, width of the source fragment | |
| srcH | int, height of the source fragment | |
| destX | int, x-coordinate of the destination fragment | |
| destY | int, y-coordinate of the destination fragment | |
| destW | int, width of the destination fragment | |
| destH | int, height of the destination fragment |
| void sptk::CPngImage::drawResized | ( | int | x, | |
| int | y, | |||
| int | w, | |||
| int | h, | |||
| int | border[], | |||
| CPatternDrawMode | drawMode, | |||
| bool | drawBackground | |||
| ) |
Draws resized image.
| x | int, the x coordinate to draw image | |
| y | int, the y coordinate to draw image | |
| w | int, the width to draw image | |
| h | int, the height to draw image | |
| border | int[], the borders that are copied from the image with minimal possible processing | |
| drawMode | CPatternDrawMode, the mode to draw the resized parts of image | |
| drawBackground | bool, if true then the internal area of the image is used for background |
| void sptk::CPngImage::drawResized | ( | int | x, | |
| int | y, | |||
| int | w, | |||
| int | h, | |||
| int | cornerZone, | |||
| CPatternDrawMode | drawMode, | |||
| bool | drawBackground | |||
| ) |
Draws resized image.
| x | int, the x coordinate to draw image | |
| y | int, the y coordinate to draw image | |
| w | int, the width to draw image | |
| h | int, the height to draw image | |
| cornerZone | int, the height (and width) of the corners that are simply copied from the image w/o processing | |
| drawMode | CPatternDrawMode, the mode to draw the resized parts of image | |
| drawBackground | bool, if true then the internal area of the image is used for background |