0
paint[1].setShader( new BitmapShader(
    BitmapFactory.decodeResource( getResources(), R.drawable.skin_),
    Shader.TileMode.REPEAT, Shader.TileMode.REPEAT));

paint.getShader().setLocalMatrix(M);

canvas.drawCircle( C.x, C.y, Size , paint[1]);

I have been trying for a long time to set the matrix to draw a picture on a circle. But I don't understand at all how this Shader overlay the image on the circle.

This is my bitmap (320x320)

And this is how Shader draw Bitmap on screen (When I just draw a circle bigger than screen)

Please explain to me! ! !

1 Answers1

0

enter image description here

canvas.drawCircle( C.x, C.y, Size , paint1);

is drawn from the upper left corner

Sidnio
  • 142
  • 9