reverse a TImage?

BlitzMax Forums/BlitzMax Beginners Area/reverse a TImage?

Chroma(Posted 2006) [#1]
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?


Perturbatio(Posted 2006) [#2]
setscale -1.0



H&K(Posted 2006) [#3]
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.


Chroma(Posted 2006) [#4]
Ok...well...my image is a TImage. Not a pixmap.

EDIT:

SetScale -1.0,1.0


Thaks Pert


H&K(Posted 2006) [#5]
Thats only because you made it an Image


Chroma(Posted 2006) [#6]
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.


H&K(Posted 2006) [#7]
XFlipPixmap:TPixmap( LockImage:TPixmap( image:TImage))
UnlockImage( image:TImage)

but SetScale -1.0,1.0
is better


Michael Reitzenstein(Posted 2006) [#8]
Because it works.