summaryrefslogtreecommitdiff
path: root/src/resources/image.h
diff options
context:
space:
mode:
authorBertram <bertram@cegetel.net>2009-07-24 22:59:13 +0200
committerBertram <bertram@cegetel.net>2009-07-24 22:59:13 +0200
commit8195e73cb801d56240beb966554a864729d9f20c (patch)
treef2a00036d15eaf70cb9abe4930b4199b1e5eae05 /src/resources/image.h
parentea6f492198a03cffc3be47df000fa16dfc3b262f (diff)
downloadmana-client-8195e73cb801d56240beb966554a864729d9f20c.tar.gz
mana-client-8195e73cb801d56240beb966554a864729d9f20c.tar.bz2
mana-client-8195e73cb801d56240beb966554a864729d9f20c.tar.xz
mana-client-8195e73cb801d56240beb966554a864729d9f20c.zip
Made the wallpaper be rescaled when necessary under SDL and OpenGL.
The SDL methods to rescale the wallpaper has been optimized to permit rescaling at load time while OpenGL draws directly rescaled. Does someone know how to smooth the rescaled image under OpenGL?
Diffstat (limited to 'src/resources/image.h')
-rw-r--r--src/resources/image.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/resources/image.h b/src/resources/image.h
index 4422fcc8..dc06a5f3 100644
--- a/src/resources/image.h
+++ b/src/resources/image.h
@@ -88,6 +88,16 @@ class Image : public Resource
static Image *load(SDL_Surface *);
/**
+ * Gets an scaled instance of an image.
+ *
+ * @param width The desired width of the scaled image.
+ * @param height The desired height of the scaled image.
+ *
+ * @return A new Image* object.
+ */
+ Image* SDLgetScaledImage(unsigned int width, unsigned int height);
+
+ /**
* Frees the resources created by SDL.
*/
virtual void unload();
@@ -105,6 +115,12 @@ class Image : public Resource
{ return mBounds.h; }
/**
+ * Tells if the image was loade using OpenGL or SDL
+ * @return true if OpenGL, false if SDL.
+ */
+ bool isAnOpenGLOne() const;
+
+ /**
* Creates a new image with the desired clipping rectangle.
*
* @return <code>NULL</code> if creation failed and a valid