0

I want to crop bitmap, but there's only rectangle examples in internet.

Example

I want to crop only red parts of image or just make that part transparent to see background.

But how can I do that?

By the way, I created image class containing, base rect and 4 points to draw trapezoid. I use canvas.drawLine method with 4 points and use RectF to draw bitmap.

Tomson
  • 73
  • 5
  • Are you aware of: [What does PorterDuff.Mode mean in android graphics.What does it do?](https://stackoverflow.com/q/8280027/295004) – Morrison Chang Apr 20 '22 at 06:42
  • @MorrisonChang Yes, I'm experimenting it, but I'm not getting good result – Tomson Apr 20 '22 at 06:57
  • @MorrisonChang I managed to clip that red part! but the problem is that if these two rectangle are overlapped, the other image doesn't show up, since everything inside red parts are cleared. – Tomson Apr 20 '22 at 07:54

0 Answers0