From 31fcdb31fb406531bec49ee2d1b3cc286ed3b5a8 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 30 Dec 2013 14:17:37 +0300 Subject: Improve drawRescaledImage in renderers. --- src/render/sdl2softwaregraphics.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'src/render/sdl2softwaregraphics.cpp') diff --git a/src/render/sdl2softwaregraphics.cpp b/src/render/sdl2softwaregraphics.cpp index fa92f6030..7210e8bbf 100644 --- a/src/render/sdl2softwaregraphics.cpp +++ b/src/render/sdl2softwaregraphics.cpp @@ -62,12 +62,9 @@ SDL2SoftwareGraphics::~SDL2SoftwareGraphics() } bool SDL2SoftwareGraphics::drawRescaledImage(const Image *const image, - int srcX, int srcY, int dstX, int dstY, - const int width, const int height, const int desiredWidth, - const int desiredHeight, - const bool useColor A_UNUSED) + const int desiredHeight) { FUNC_BLOCK("Graphics::drawRescaledImage", 1) // Check that preconditions for blitting are met. @@ -89,10 +86,10 @@ bool SDL2SoftwareGraphics::drawRescaledImage(const Image *const image, SDL_Rect srcRect = { - static_cast(srcX + bounds.x), - static_cast(srcY + bounds.y), - static_cast(width), - static_cast(height) + static_cast(bounds.x), + static_cast(bounds.y), + static_cast(bounds.w), + static_cast(bounds.h) }; SDL_Rect dstRect = -- cgit v1.2.3-70-g09d2