I am working on a Custom Image View in which you can control the radius of each corner individually.
The problem I am facing right now is that when I use canvas.drawPath(path, bitmapPaint), the image is scaled starting from top = 0 and left = 0 and scaled according to its aspect ratio.
I want to implement scale types for the the view, let's say I want to start from center crop.
I went through the Android image view implementation and got a little idea that I have to create scale and translate values. I have experience in 3D graphics and how texture works, so don't worry about how complicated the solution would be.
Following is the current output:
You can see how the image is getting stretched.