I have to implement Bitmap whose shape is like a rhomboid(For ref. I have attached sample image for it.) and the source image is rectangular. I do want to make the image to be skewed, cut the image in this shape.

Can anyone give me any idea how it can be implemented?
Create a Path of the shape you need and use the canvas.clipPath() method prior to drawing each of the bitmaps.
I have done this with a circle:
Path mPath = new Path();
mPath.addCircle(centerx, centery, radius, Path.Direction.CCW);
canvas.clipPath(mPath, Region.Op.REPLACE);
canvas.drawBitmap(....);
There are various path methods that you can use to create the desired path (path.addArc, path.lineTo, etc).
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