public enum FillType {
// these must match the values in SkPath.h
/**
* Specifies that "inside" is computed by a non-zero sum of signed edge crossings. 判断点是否是内部的依据是,由点向外划一条直线,穿过的边数,顺时针为1逆时针为-1,加起来非0就表示内部;0就是外部。
*/
WINDING (0),
/**
* Specifies that "inside" is computed by an odd number of edge crossings.判断点是否是内部的依据是,由点向外划一条直线,穿过的边数为奇数即为内部。Odd even 奇数偶数。
*/
EVEN_ODD (1),
/**
* Same as {@link #WINDING}, but draws outside of the path, rather than inside.
*/
INVERSE_WINDING (2),
/**
* Same as {@link #EVEN_ODD}, but draws outside of the path, rather than inside.
*/
INVERSE_EVEN_ODD(3);
FillType(int ni) {
nativeInt = ni;
}
final int nativeInt;
}
评论