From 04916c1b451e4400a496ae210b3faa10154c65ac Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 21 Nov 2012 21:13:31 +0300 Subject: Add batch drawing for any images. Add this drawing to Button. --- src/graphics.h | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'src/graphics.h') 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. -- cgit v1.2.3-60-g2f50