'Draw Bitmap on an circle with BitmapShader
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.
And this is how Shader draw Bitmap on screen (When I just draw a circle bigger than screen)
Please explain to me! ! !
Solution 1:[1]
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | LiangKe |
