Rotate bitmap in degrees in Android
•
Android
I'm developing a shooting game with bows and arrows.. so how to rotate bows and arrows??? I've tried different animation classes, but it doesn't work
resolvent:
You can use the matrix class. You can try the following code:
Matrix matrix = new Matrix();
matrix.setRotate(degrees);
Bitmap bmpBowRotated = Bitmap.createBitmap(bmpBow, 0, 0, bmpBow.getWidth(),getHeight(), matrix, false);
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码