Drawing two shapes with transparency in Android/Ja

2019-08-11 04:22发布

I'm drawing two shapes in Android using paint and canvas. I applied transparency to the paint color, but now when the two shapes (same color) intersect the intersecting section comes out darker.

enter image description here

Does anyone know how to accomplish this?

Here is a quick look at my paint code (which... should be the only object necessary to complete this I imagine).

        Paint paint = new Paint();
paint.setColor(color);
paint.setAntiAlias(true);
paint.setStrokeWidth(strokeWidth);
paint.setStrokeJoin(Paint.Join.ROUND);
paint.setStrokeCap(Paint.Cap.ROUND);
paint.setPathEffect(new CornerPathEffect(15));
paint.setStyle(Paint.Style.FILL);

0条回答
登录 后发表回答