summaryrefslogtreecommitdiff
path: root/src/resources/image.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-01-14 12:43:28 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-01-14 12:43:28 +0000
commit5a1007fa3e827c03bb86db71cb26dfd4c485f28d (patch)
treea8f114d7ae6ccb1806602b89d3ea3cf6bbfe7d83 /src/resources/image.h
parentcfac9a371a684a3a6f37bad725094b7e2d80a7d1 (diff)
downloadMana-5a1007fa3e827c03bb86db71cb26dfd4c485f28d.tar.gz
Mana-5a1007fa3e827c03bb86db71cb26dfd4c485f28d.tar.bz2
Mana-5a1007fa3e827c03bb86db71cb26dfd4c485f28d.tar.xz
Mana-5a1007fa3e827c03bb86db71cb26dfd4c485f28d.zip
Extended Image with methods to get width, height and draw a pattern and made
Window widget use it.
Diffstat (limited to 'src/resources/image.h')
-rw-r--r--src/resources/image.h20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/resources/image.h b/src/resources/image.h
index 363dabde..8f956324 100644
--- a/src/resources/image.h
+++ b/src/resources/image.h
@@ -63,6 +63,16 @@ class Image : public Resource
void unload();
/**
+ * Returns the width of the image.
+ */
+ int getWidth();
+
+ /**
+ * Returns the height of the image.
+ */
+ int getHeight();
+
+ /**
* Creates a new image with the desired clipping rectangle.
* @return <code>NULL</code> if creation failed and a valid
* object otherwise.
@@ -70,12 +80,18 @@ class Image : public Resource
Image* createSubImage(int x, int y, int width, int height);
/**
- * Attempts to blit the internal image onto the screen.
+ * Blits the internal image onto the screen.
+ *
* @return <code>true</code> if the image was blitted properly
- * <code>false</code> otherwise.
+ * <code>false</code> otherwise.
*/
bool draw(BITMAP *screen, int x, int y);
+ /**
+ * Does a pattern fill on the given area.
+ */
+ void drawPattern(BITMAP *screen, int x, int y, int w, int h);
+
protected:
//SDL_Rect screenRect;
//SDL_Surface *image;