Skip to content

仿真翻页动画clipPath方法中的参数Region.Op.XOR在Android.P后不再支持,仿真翻页效果异常 #17

Description

@274800562

canvas.clipPath(mPath0, Region.Op.XOR);
clipPath方法内部有调用checkValidClipOp()方法。
private static void checkValidClipOp(@nonnull Region.Op op) {
if (sCompatiblityVersion >= Build.VERSION_CODES.P
&& op != Region.Op.INTERSECT && op != Region.Op.DIFFERENCE
) {
throw new IllegalArgumentException(
"Invalid Region.Op - only INTERSECT and DIFFERENCE are allowed");
}
}
API版本大于28时,只支持Region.Op.INTERSECT和Region.Op.DIFFERENCE,不支持Region.Op.XOR,差集效果怎么实现?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions