Hi

I was trying to find an appropriate way to draw a portion of a bitmap
rotated onto the canvas.

Rotating canvas does not seem appropriate for my situation; I am working on
a game, there will be up to 30 soldiers on the screen. Rotating the whole
canvas seperately for each of them does not seem nice.
I can't apply rotation to a matrix and use it in canvas.drawBitmap(source,
matrix, paint) method. It works for the whole bitmap. I need to draw only a
portion of bitmap at each frame. I am using sprite animation.

Somethings could be done using Bitmap.createBitmap(...) method but making
bitmap creations continuously at each frame isn't nice. While writing these
something came to my mind :), may be I could divide the frames into
different bitmap objects at initialization phase using this createBitmap
method, then apply rotation to these bitmaps using matrix.

Anyway, I will try this but I would be glad to hear better approaches.


-- 

Emre

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to