diff options
author | Björn Steinbrink <B.Steinbrink@gmx.de> | 2005-08-14 21:11:54 +0000 |
---|---|---|
committer | Björn Steinbrink <B.Steinbrink@gmx.de> | 2005-08-14 21:11:54 +0000 |
commit | 0ce6e9e8400c326e6848688b3b865c84d96e3073 (patch) | |
tree | dcdadb14763fabace881ca0c53ff946a635c9c20 /src/resources/image.h | |
parent | 89dd5a7e669012bdb838cbf41418b2d779df300b (diff) | |
download | mana-0ce6e9e8400c326e6848688b3b865c84d96e3073.tar.gz mana-0ce6e9e8400c326e6848688b3b865c84d96e3073.tar.bz2 mana-0ce6e9e8400c326e6848688b3b865c84d96e3073.tar.xz mana-0ce6e9e8400c326e6848688b3b865c84d96e3073.zip |
Moved image drawing code into the graphics class.
Diffstat (limited to 'src/resources/image.h')
-rw-r--r-- | src/resources/image.h | 47 |
1 files changed, 3 insertions, 44 deletions
diff --git a/src/resources/image.h b/src/resources/image.h index 7d1fe3c4..85f790ba 100644 --- a/src/resources/image.h +++ b/src/resources/image.h @@ -36,6 +36,8 @@ */ class Image : public Resource { + friend class Graphics; + public: /** * Destructor. @@ -83,27 +85,6 @@ class Image : public Resource getSubImage(int x, int y, int width, int height); /** - * Blits the image onto the screen. - * - * @return <code>true</code> if the image was blitted properly - * <code>false</code> otherwise. - */ - virtual bool - draw_deprecated(SDL_Surface *screen, - int srcX, int srcY, - int dstX, int dstY, - int width, int height); - - /** - * Blits the image onto the screen. - * - * @return <code>true</code> if the image was blitted properly - * <code>false</code> otherwise. - */ - virtual bool - draw_deprecated(SDL_Surface *screen, int x, int y); - - /** * Sets the alpha value of this image. */ void @@ -125,11 +106,11 @@ class Image : public Resource #endif Image(SDL_Surface *image); + SDL_Rect bounds; bool loaded; #ifdef USE_OPENGL GLuint glimage; - int width, height; int texWidth, texHeight; #endif SDL_Surface *image; @@ -158,18 +139,6 @@ class SubImage : public Image ~SubImage(); /** - * Returns the width of the image. - */ - int - getWidth() const; - - /** - * Returns the height of the image. - */ - int - getHeight() const; - - /** * Creates a new image with the desired clipping rectangle. * * @return <code>NULL</code> if creation failed and a valid @@ -178,18 +147,8 @@ class SubImage : public Image Image* getSubImage(int x, int y, int width, int height); - /** - * Draws this image. - */ - bool - draw_deprecated(SDL_Surface *screen, - int srcX, int srcY, - int dstX, int dstY, - int width, int height); - private: Image *parent; - SDL_Rect rect; }; #endif |