summaryrefslogtreecommitdiff
path: root/src/resources/image.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources/image.h')
-rw-r--r--src/resources/image.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/resources/image.h b/src/resources/image.h
index a4048803..9af10fda 100644
--- a/src/resources/image.h
+++ b/src/resources/image.h
@@ -40,6 +40,8 @@
#include "resource.h"
class Dye;
+class SDL_Rect;
+class SDL_Surface;
/**
* Defines a class for loading and storing images.
@@ -92,6 +94,12 @@ class Image : public Resource
virtual void unload();
/**
+ * Returns the image.
+ */
+ virtual const Image* getImage() const
+ { return this; }
+
+ /**
* Returns the width of the image.
*/
virtual int getWidth() const
@@ -114,7 +122,7 @@ class Image : public Resource
/**
* Sets the alpha value of this image.
*/
- void setAlpha(float alpha);
+ virtual void setAlpha(float alpha);
/**
* Returns the alpha value of this image.
@@ -181,6 +189,12 @@ class SubImage : public Image
~SubImage();
/**
+ * Returns the image.
+ */
+ virtual const Image* getImage() const
+ { return mParent; }
+
+ /**
* Creates a new image with the desired clipping rectangle.
*
* @return <code>NULL</code> if creation failed and a valid