关于Canvas的clipRect (float left, float top, float right, float bottom, Region.Op op) 中Region.Op
Op类提供了枚举类型的常量,Region源码中有这么一段:
// the native values for these must match up with the enum in SkRegion.h
public enum Op {
DIFFERENCE(0),
INTERSECT(1),
UNION(2),
XOR(3),
REVERSE_DIFFERENCE(4),
REPLACE(5);
Op(int nativeInt) {
this.nativeInt = nativeInt;
}
final int nativeInt;
}
它的常量表示:
//INTERSECT 取两者交集,默认的方式
//DIFFERENCE 第一次不同于第二次的部分显示出来
//REPLACE 显示第二次的
//REVERSE_DIFFERENCE 第二次不同于第一次的部分显示
//UNION 取全集
//XOR 补集,就是全集的减去交集的剩余部分显示
当在使用clipRect (float left, float top, float right, float bottom, Region.Op op)的方法时需要指定op类型。
最后
以上就是美好月亮最近收集整理的关于关于Canvas的clipRect (float left, float top, float right, float bottom, Region.Op op) 中Region.Op关于Canvas的clipRect (float left, float top, float right, float bottom, Region.Op op) 中Region.Op的全部内容,更多相关关于Canvas的clipRect内容请搜索靠谱客的其他文章。
发表评论 取消回复