diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-11-21 21:13:31 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-12-01 22:58:18 +0300 |
commit | 04916c1b451e4400a496ae210b3faa10154c65ac (patch) | |
tree | fe7414434dcb6bcc1405b0d608d82348bc3ca466 /src/graphics.h | |
parent | d48e360ea40536e9f3e7fb4ce381b7fdc2ee5954 (diff) | |
download | manaplus-04916c1b451e4400a496ae210b3faa10154c65ac.tar.gz manaplus-04916c1b451e4400a496ae210b3faa10154c65ac.tar.bz2 manaplus-04916c1b451e4400a496ae210b3faa10154c65ac.tar.xz manaplus-04916c1b451e4400a496ae210b3faa10154c65ac.zip |
Add batch drawing for any images.
Add this drawing to Button.
Diffstat (limited to 'src/graphics.h')
-rw-r--r-- | src/graphics.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/graphics.h b/src/graphics.h index 7a5dc41a5..141de7456 100644 --- a/src/graphics.h +++ b/src/graphics.h @@ -29,6 +29,7 @@ class GraphicsVertexes; class Image; +class ImageCollection; class ImageVertexes; class MapLayer; @@ -211,11 +212,34 @@ class Graphics : public gcn::SDLGraphics const Image *const left, const Image *const center); + virtual bool calcImageRect(ImageVertexes *const vert, + const int x, const int y, + const int w, const int h, + const Image *const topLeft, + const Image *const topRight, + const Image *const bottomLeft, + const Image *const bottomRight, + const Image *const top, + const Image *const right, + const Image *const bottom, + const Image *const left, + const Image *const center); + virtual void calcImagePattern(GraphicsVertexes *const vert, const Image *const image, const int x, const int y, const int w, const int h) const; + virtual void calcImagePattern(ImageVertexes *const vert, + const Image *const image, + const int x, const int y, + const int w, const int h) const; + + virtual void calcImagePattern(ImageCollection *const vert, + const Image *const image, + const int x, const int y, + const int w, const int h) const; + virtual void calcTile(ImageVertexes *const vert, const Image *const image, int x, int y) const; @@ -223,6 +247,12 @@ class Graphics : public gcn::SDLGraphics virtual void drawTile(const ImageVertexes *const vert); + virtual void drawTile(const ImageCollection *const vertCol); + + virtual void calcTile(ImageCollection *const vertCol, + const Image *const image, + int x, int y); + virtual void drawImageRect2(GraphicsVertexes *const vert, const ImageRect &imgRect); @@ -233,6 +263,11 @@ class Graphics : public gcn::SDLGraphics const int x, const int y, const int w, const int h, const ImageRect &imgRect); + virtual bool calcWindow(ImageCollection *const vertCol, + const int x, const int y, + const int w, const int h, + const ImageRect &imgRect); + /** * Draws a rectangle using images. 4 corner images, 4 side images and 1 * image for the inside. |