In the below image red color is the canvas. The black color part is the figure I am drawing in my canvas. I want to crop the black color part from my canvas. How shall I do it?.
I tried using canvas.clipPath()
but I guess its no longer supported in Android now, due to hardware acceleration. I tried disableing the hardware acceleration also but it dint work so I gave up on canvas.clipPath()
.
Is there any other way I can use to crop path within canvas
?
Any help will be appreciated. Thanks in advance :)