From 8195e73cb801d56240beb966554a864729d9f20c Mon Sep 17 00:00:00 2001 From: Bertram Date: Fri, 24 Jul 2009 22:59:13 +0200 Subject: 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? --- src/graphics.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'src/graphics.h') diff --git a/src/graphics.h b/src/graphics.h index d0e70c24..eca7e1a5 100644 --- a/src/graphics.h +++ b/src/graphics.h @@ -104,6 +104,28 @@ class Graphics : public gcn::SDLGraphics void drawImage(gcn::Image const *image, int srcX, int srcY, int dstX, int dstY, int width, int height); + /** + * Draws a resclaled version of the image + */ + bool drawRescaledImage(Image *image, int srcX, int srcY, + int dstX, int dstY, + int width, int height, + int desiredWidth, int desiredHeight) + { return drawRescaledImage(image, srcX, srcY, + dstX, dstY, + width, height, + desiredWidth, desiredHeight, + false); }; + + /** + * Draws a resclaled version of the image + */ + virtual bool drawRescaledImage(Image *image, int srcX, int srcY, + int dstX, int dstY, + int width, int height, + int desiredWidth, int desiredHeight, + bool useColor = false); + /** * Blits an image onto the screen. * -- cgit v1.2.3-70-g09d2