I'm trying to draw a transparent 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
Select the shape or shapes that you want to make transparent. Right-click, and on the context menu, select Format > Fill. Set the Transparency slider to the percentage of transparency that you want.
Make your shape transparent by clicking on the paint can icon > Transparent, and remove the outline of the shape by going to Line Color > Transparent. Next, select your shape, right-click, insert a link, and then choose to link to another slide in the presentation.
I found it.
paint.setAlpha
must come after paint.setColor
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With