mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-19 23:41:14 +00:00
When retrieving dimensions, return the scaled size of the texture.
This commit is contained in:
parent
4bbdc09af6
commit
c69b5a3bb6
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user