The mirror function for the Window OS, unfortunately they don't work on Linux OS.
Code: Select all
Procedure MirrorImageX(Image)
; Mirrors an image around the X-axis
Width = ImageWidth(Image)
Height = ImageHeight(Image)
hDC = StartDrawing(ImageOutput(Image))
StretchBlt_(hDC,0,Height,Width,-Height,hDC,0,0,Width,Height, #SRCCOPY) ;
StopDrawing()
EndProcedure
Procedure MirrorImageY(Image)
; Mirrors an image around the Y-axis
Width = ImageWidth(Image)
Height = ImageHeight(Image)
hDC = StartDrawing(ImageOutput(Image))
StretchBlt_(hDC,Width,0,-Width,Height,hDC,0,0,Width,Height, #SRCCOPY) ;
StopDrawing()
EndProcedure
Why I need this :
1. I need to create 4 ButtonImageGadget(), so I would like to load the upward arrow then copy, rotate/flip the upward arrow for the 3 remaining direction.
(Workaround : Load 4 differents images)
2. Custom Texture loader for game project. The bmp image file seem to be saved upside down, so it's more easy to flip the texture than the texture UV mapping coordinate.
(Workaround : because my game project are in the early stage, I flip the UV map coordinate but it's not the best solution. It's possible to redraw the image point by point but it's slow, very slow.)
Best Regards
Guimauve