A quick nooby question: how can i resize images?
here I have a 1600x900 image called riquadro.png . "Riquadro" means panel, in italian.
I had in mind to use that panel during almost the entire game, by altering its size and using it as background for all the various menus of the games. But I see that i can't alter its size with the .draw method.
Basically I'm trying to do what in HTML you do with the attributes height and width: <img src="..." height="..." width="...">. And I see in the documentation
that also with Gosu there are those attributes, so I suppose there must be a similar solution >.<
In Gosu::Image's :draw method, you can use the parameters "factor_x" and "factor_y". These are set to 1 by default. Basically, they are like the numerator of a fraction when the denominator is always 1. So the value 2 would draw a size of 2/1 of your original size. Hope this helps!
I have always wondered what was the purpose of those "factor_x" and "factor_y".
Well, thanks a lot, problem solved ;)
Sure, no problem! :)
Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill