1

Rotate around a point and scale around another point a Bitmap with a Matrix

view story
linux-howto

http://stackoverflow.com – I scale and rotate the canvas before drawing the Bitmap mImage (that represent a rectangle). In code(inside Rectangle class): @Override public void draw(Canvas c){ c.save(); //Rotate the canvas around the center of the rectangle. c.rotate(mRotation, mPosition.getX(), mPosition.getY()); //Scale the canvas with the top-left corner of the rectangle as pivot. c.scale(mWidth/mImage.getWidth(), mHeight/mImage.getHeight(), left(), top()); //Draw the rectangle. c.drawBitmap(mImage, left(), top(), PAINT); c.restore(); } Where mPosition is the center point of the R (HowTos)