M magarcan Active Member Licensed User Longtime User Jul 26, 2011 #1 I want to do something like this. When you press over the line, and pressing you move your finger arround the circle, the image rotates to the position where you stop pressing. Some pictures: This is the initial estate: Then you press over the line and moves to rigth (red line is the finger movement): The red point in center is only for reference. At the end, you stop pressing in the following position, so image comes up like this: -Any idea about how can I implement this? -An other question. When I define an ImageView it is square, can I change the shape in order to be round? Thanks!!
I want to do something like this. When you press over the line, and pressing you move your finger arround the circle, the image rotates to the position where you stop pressing. Some pictures: This is the initial estate: Then you press over the line and moves to rigth (red line is the finger movement): The red point in center is only for reference. At the end, you stop pressing in the following position, so image comes up like this: -Any idea about how can I implement this? -An other question. When I define an ImageView it is square, can I change the shape in order to be round? Thanks!!
Erel B4X founder Staff member Licensed User Longtime User Jul 27, 2011 #2 You can draw rotated bitmaps with Canvas.DrawBitmapRotated. You will need to handle the panel or activity Touch event, calculate the correct angle and then draw the rotated bitmap. Views are always shaped as rectangles. Upvote 0
You can draw rotated bitmaps with Canvas.DrawBitmapRotated. You will need to handle the panel or activity Touch event, calculate the correct angle and then draw the rotated bitmap. Views are always shaped as rectangles.
M magarcan Active Member Licensed User Longtime User Jul 27, 2011 #3 Erel said: You can draw rotated bitmaps with Canvas.DrawBitmapRotated. You will need to handle the panel or activity Touch event, calculate the correct angle and then draw the rotated bitmap. Views are always shaped as rectangles. Click to expand... I load my image in a Imageview. I've seen that DrawBitmapRotated it's only for canvas. How can I load my image with canvas? I've seen some samples but are too complex. Thanks! Upvote 0
Erel said: You can draw rotated bitmaps with Canvas.DrawBitmapRotated. You will need to handle the panel or activity Touch event, calculate the correct angle and then draw the rotated bitmap. Views are always shaped as rectangles. Click to expand... I load my image in a Imageview. I've seen that DrawBitmapRotated it's only for canvas. How can I load my image with canvas? I've seen some samples but are too complex. Thanks!
K Kamac Active Member Licensed User Longtime User Jul 27, 2011 #4 http://www.b4x.com/forum/basic4android-updates-questions/6442-catch-bouncing-smiley.html#post37715 Look at that example providen by Erel . There's a rotating smiley ball written by canvas. Upvote 0
http://www.b4x.com/forum/basic4android-updates-questions/6442-catch-bouncing-smiley.html#post37715 Look at that example providen by Erel . There's a rotating smiley ball written by canvas.
klaus Expert Licensed User Longtime User Jul 27, 2011 #5 You could have a look at DrawNeedleImage. Best regards. Upvote 0