Reputation: 938
In my Android project, I've updated my project to API 26, but now the function Canvas.clipRegion(Region region) is no longer there. can anyone help me with this? what function must I use now in place of clipRegion.
public boolean clipRegion(@NonNull final Region region, @NonNull final Op op) {
region.translate(xOffset, yOffset);
return mCanvas.clipRegion(region, op);
}
Upvotes: 2
Views: 2357
Reputation: 8835
In the documentation Canvas. They mention that clipRegion method is removed not deprecated. Instead of use clipOutPath method. For more info please refer the link.
Upvotes: 1