ArthurHub / ArthurHub/Android-Image-Cropper

Selecting circle crop area crashes with targetsdk 28

Open
#612 5 comments 11 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
6.4k
Forks
1.4k
PR merge metrics
No merged PRs in 30d

Description

In the **drawBackground** method of the **CropOverlayView** the call:

canvas.clipPath(mPath, Region.Op.XOR);

crashes with the following message:
java.lang.IllegalArgumentException: Invalid Region.Op - only INTERSECT and DIFFERENCE are allowed

Starting sdk28 the clipPath (Path path, Region.Op op) method is **deprecated** now as stated here:
https://developer.android.com/reference/android/graphics/Canvas#clipPath(android.graphics.Path,%20android.graphics.Region.Op)

Any change this could be changed?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.