How to draw a transparent circle?
I'm trying to draw a tra开发者_开发问答nsparent circle, but it just doesn't work.
when I'm drawing a bitmap it works, but a circle doesn't become transparent.
Here's my code in short:
Paint paint = new Paint();
paint.setAlpha(125);
canvas.drawBitmap(bitmap, sourceRect, destRect, paint); // this works fine
canvas.drawCircle(x, y, radius, paint); // the circle is drawn but not transparent
I found it.
paint.setAlpha
must come after paint.setColor
精彩评论