SFML community forums

Help => Graphics => Topic started by: bryce910 on October 31, 2015, 12:53:18 am

Title: How do I get the original size of the sprite before I scaled it
Post by: bryce910 on October 31, 2015, 12:53:18 am
Hello guys!

I am working on scaling some textures accordingly and I am trying to figure out how do I get the original size of the sprite after I already scaled the item.

For example:

/* Sprite Size = 800X600 */
Sprite.setScale(2.0f, 2.0f);
/* New size 16200X1200 */
 

How would I obtain getting the value of the original size of the sprite (800 X 600) without rescaling it?
Title: Re: How do I get the original size of the sprite before I scaled it
Post by: G. on October 31, 2015, 01:05:10 am
getLocalBounds
http://www.sfml-dev.org/documentation/2.3.2/classsf_1_1Sprite.php#a69557a8369bc2e26dd2e2eb2c50f5c90
Title: Re: How do I get the original size of the sprite before I scaled it
Post by: bryce910 on October 31, 2015, 01:06:58 am
Thank you. I just noticed the different between global and local!