DrawRotatedBitmap

Biscuit

Member
Licensed User
Longtime User
Hi

Sorry I haven't got my maths brain on tonight so I wonder if someone can help...

I have been using DrawRotatedBitmap which is a great function however, I'd like to rotate the bitmap about another point other than its centre. I have looked at the examples for the rotating smiley and the compass needle here:
http://www.b4x.com/forum/basic4android-updates-questions/6733-rotating-bitmap.html
http://www.b4x.com/forum/basic4android-updates-questions/6442-catch-bouncing-smiley.html

but they both use an image that 'wants' to be rotated about its center. Imagine that instead of a drawing compass needle, you wanted to draw the hands of a clock. This would mean one end of the clock hand would be fixed on the screen and the other end of the bitmap would rotate around it. One solution would be to extend my bitmap with a new transparent half which would give the desired effect (since the end would now be at the centre) but if there's an simpler way to do this in code with the relevant transformation that would be sweet :)

Thanks
 
Top