Sub RotateBitmap (bmp As B4XBitmap, Degrees As Float) As B4XBitmap
Dim cvs As B4XCanvas
Dim panel As B4XView = xui.CreatePanel("")
panel.SetLayoutAnimated(0, 0, 0, bmp.Width, bmp.Height)
cvs.DrawBitmapRotated(bmp, cvs.TargetRect, Degrees)...
I am trying to apply this method advised by Erel, to rotate a view:
Dim x As B4XView = YourView
x.Rotation = 45
To understand what was the center of the rotation, I checked the view Left and Top before and after the rotation, but they are unchanged.
I use cameraKit library, but my camera preview presents a view (in the panel) which is 90° rotated regarding to the object I wish to take.
I didn't find a propertiy which permits me to change this angle to 0°.
Did I miss something or How can I do ?
Thanks much for giving me a way.
I have a simple script to animate a loader image
during a wait for poststring class. It's works great but between each loop of the rotation there is a few waiting second ?
like that :
the code :
Dim POStr As POSTstr
Dim imgload As Animation...
So far I've used the native Android commands to rotate the views according to the X, Y, and Z axes. The native commands let you change the X and Y coordinates of the Pivot point and get this.
But to get a rotating cube it is not enough to be able to rotate on three axes but you have to be...