Scaling Images
Monkey Forums/Monkey Beginners/Scaling Images
| ||
This may be a noobish question, but this is the beginner forum... I decided I wanted to learn Monkey, so I started today. I'm used to Blitz3D, with the simple ScaleImage command, but I can't seem to find a command like this in Monkey. How do I scale an image? |
| ||
two ways. 1. Scale(x,y) -- this scales the global matrix. 2. DrawImage(img,x,y,rotation,scaleX,scaleY) - this is an overload of DrawImage that lets you specify a rotation and scale. |
| ||
Thank you so much! And the fact that rotation is in there is even better! |
| ||
If you're using this, make sure to set the handle to Image.MidHandle. Scaling and rotation is a nightmare with the default top left handle. |
| ||
I perfer to you Nobo's second suggestion as I personally think that it gives you the most control. The overload will only affect a specific image, while Scale uses the global matrix that will affect everything that is rendered if you do not reset it. |