placeing bitmaps in live wallpapers

462 Views Asked by At

Hello I am trying to place acouple bitmaps on the screen and rotate them. I can get this to work by doing

canvas.drawBitmap(pic2, rotatePic, null);

rotatePic is matrix with

postRotate(5, pic2.getHieght()/2, pic2.getWidth()/2) 

this rotates the pic and puts it at 0, 0 so to place it i tried

Bitmap topPic = Bitmap.createBitmap(pic2, 0, 0, pic2.getWidth(), 
        pic2.getHeight(), rotatePic, false); 

than place with

canvas.drawBitmap(topPic, 200, 100, null);

it places it correctley but it no longer rotates correctley it looks like it is bouncing and spinning I've tried everthing

1

There are 1 best solutions below

1
On

You can alternatively try rotating the canvas itself, using

canvas.rotate(degress, px, py);

Here's a link to the Android reference page for this:

Canvas.rotate();

Hope this helps!!