I use this code to flip a bitmap horizontally in a imageview and works properly once:
I want to click again in the same button and the bitmap returns to original position and click again and bitmap is reversed and so on...
The project is in attached.
Thanks in advance for any tip.
B4X:
Sub btnFlip_Click
Dim c As Canvas
c.Initialize(imgvMain)
Dim r As Rect
r.Initialize(0, 0, imgvMain.Width, imgvMain.Height)
c.DrawBitmapFlipped(LoadBitmap(File.DirAssets, "back1.jpg"), Null, r, False, True)
bmp1.Initialize3(c.Bitmap)
imgvMain.Bitmap = bmp1
End Sub
I want to click again in the same button and the bitmap returns to original position and click again and bitmap is reversed and so on...
The project is in attached.
Thanks in advance for any tip.