diff options
author | Bertram <bertram@cegetel.net> | 2009-08-14 00:19:00 +0200 |
---|---|---|
committer | Bertram <bertram@cegetel.net> | 2009-08-14 00:19:00 +0200 |
commit | 32e63222acc750fce68048211df3434256802ec4 (patch) | |
tree | 608bdf91eb83019dfe0a8a96b721d3eee1bb6d6f /src/resources/image.h | |
parent | 1f2a31c0a97ee2ff858fe142e778c49011b93f71 (diff) | |
download | mana-client-32e63222acc750fce68048211df3434256802ec4.tar.gz mana-client-32e63222acc750fce68048211df3434256802ec4.tar.bz2 mana-client-32e63222acc750fce68048211df3434256802ec4.tar.xz mana-client-32e63222acc750fce68048211df3434256802ec4.zip |
Added a new function to know if an image is using an alpha channel.
This all will be useful for my next patch: Repair windows opacity break in SDL mode.
Diffstat (limited to 'src/resources/image.h')
-rw-r--r-- | src/resources/image.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/resources/image.h b/src/resources/image.h index c97523a9..535a3536 100644 --- a/src/resources/image.h +++ b/src/resources/image.h @@ -111,12 +111,18 @@ class Image : public Resource { return mBounds.h; } /** - * Tells if the image was loade using OpenGL or SDL + * Tells if the image was loaded using OpenGL or SDL * @return true if OpenGL, false if SDL. */ bool isAnOpenGLOne() const; /** + * Tells if the image has got an alpha channel + * @return true if OpenGL, false if SDL. + */ + bool hasAlphaChannel(); + + /** * Sets the alpha value of this image. */ virtual void setAlpha(float alpha); @@ -181,6 +187,7 @@ class Image : public Resource SDL_Rect mBounds; bool mLoaded; float mAlpha; + bool mAlphaChannel; // ----------------------- // SDL protected members @@ -191,7 +198,6 @@ class Image : public Resource static Image *_SDLload(SDL_Surface *tmpImage); - SDL_Surface *mSDLSurface; |