florent37 / ShapeOfView

Give a custom shape to any android view, Material Design 2 ready
Apache License 2.0
3.12k stars 400 forks source link

Clipping Image Based on Color of Mask #70

Open charlizesmith opened 4 years ago

charlizesmith commented 4 years ago

Hello Idean, I am using Shape of View to clip my image into given shape Image. The image is clipped to the black opaque part of Shape Image. I have implemented it successfully.

But i want to know if is it possible that instead of opaque clip area, can i clip my photo on a particular colour or some transparent area of shape of you drawable with this library?

I have noticed that you are using
clipPaint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.DST_IN)); canvas.drawBitmap(clipBitmap, 0, 0, clipPaint);

What is the use of Clipmanager ? Can we clipped image based on Color of mask area?
Can you please help me out with this?