Impossible for me to rotate bitmap properly,
I made several tests unsuccessfully
dimension of image:460*320
here my code:
I made several tests unsuccessfully
dimension of image:460*320
here my code:
B4X:
'Activity module
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim image1 As Bitmap
Dim image2 As Bitmap
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim imageview1 As ImageView
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("test")
image1=LoadBitmap(File.DirAssets,"test.png")
imageview1.SetBackgroundImage(image1)
End Sub
Sub ImageView1_click
Dim canvas1 As Canvas
Dim rect1 As Rect
rect1.Initialize(0,0,320,460)
image2.InitializeMutable(320,460)
canvas1.Initialize2(image2)
canvas1.DrawBitmapRotated(image1,Null,rect1,90)
imageview1.SetBackgroundImage(image2)
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub