SFML community forums
Help => Graphics => Topic started by: Joshua Flynn on May 23, 2011, 12:18:10 am
-
Hello,
I've got a window of a specific size (512 x 512), and any images whose height is lower than this (256) or greater than this (1024, 2048), have their sprite rescaled to match the 512 requirement.
The problem is, I find the scale/resize system relative rather than absolute, so, for example:
If I load an image that is 256 to sprite, and resize/scale sprite to fit 512, and then I reload another image (also 256), and then resize/rescale sprite - instead of sprite still being 512, sprite becomes 1024, 2048 etc etc.
How do I make it so the scaling of sprite is reset to normal?
Thank you.
-
Any offers of help?
-
One hour is certainly too early to push your post, especially at this time :roll:
-
One hour is certainly too early to push your post, especially at this time :roll:
Well, let's try 1pm then. I am a programmer after all.
-
SetScale and Resize are absolute.
Scale is relative to previous scale factors.
-
Alright. Resize for some reason, acted relative. I'll try SetScale.
Thank you!
-
Alright. Resize for some reason, acted relative.
It would be a bug. Can you please provide a minimal and complete example that reproduces this problem?