When retrieving dimensions, return the scaled size of the texture.

This commit is contained in:
Boldizsár Lipka 2014-06-16 14:24:25 +02:00
parent 4bbdc09af6
commit c69b5a3bb6

View File

@ -289,7 +289,7 @@ int ttexture::width() const
int w;
SDL_QueryTexture(texture_,NULL, NULL, &w, NULL);
return w;
return w*hscale_;
}
int ttexture::height() const
@ -297,7 +297,7 @@ int ttexture::height() const
int h;
SDL_QueryTexture(texture_,NULL, NULL, NULL, &h);
return h;
return h*vscale_;
}
SDL_Rect ttexture::dimensions() const
@ -307,6 +307,8 @@ SDL_Rect ttexture::dimensions() const
dim.y = 0;
SDL_QueryTexture(texture_, NULL, NULL, &dim.w, &dim.h);
dim.w *= hscale_;
dim.h *= vscale_;
return dim;
}