reverse a TImage?
BlitzMax Forums/BlitzMax Beginners Area/reverse a TImage?
| ||
I'm loading a TImage like this. My guy is facing to the right:guy:TImage = LoadImage("guy.png") MidHandleImage box Now I just want to mirror this image on the fly so he'll face left. Is there a native method to just flip an image horizontally? |
| ||
setscale -1.0 |
| ||
Function XFlipPixmap:TPixmap( pixmap:TPixmap ) Returns A new pixmap object. Description Flip a pixmap horizontally. Function YFlipPixmap:TPixmap( pixmap:TPixmap ) Returns A new pixmap object. Description Flip a pixmap vertically. |
| ||
Ok...well...my image is a TImage. Not a pixmap. EDIT: SetScale -1.0,1.0 Thaks Pert |
| ||
Thats only because you made it an Image |
| ||
Yes. That's because I want it to be a TImage. Hence the topic doesn't read "reverse a Pixmap?". It reads "reverse a TImage?". Reading is good. |
| ||
XFlipPixmap:TPixmap( LockImage:TPixmap( image:TImage)) UnlockImage( image:TImage) but SetScale -1.0,1.0 is better |
| ||
Because it works. |