Enum FillRule
- All Implemented Interfaces:
Serializable,Comparable<FillRule>,java.lang.constant.Constable
Complex polygons are defined by one or more closed paths that set both outer
and inner polygon boundaries. But only portions of these paths (or
'contours') may be setting polygon boundaries, so crossing a path may or may
not mean entering or exiting a 'filled' polygon region. For this reason
complex polygons require filling rules that define which polygon sub-regions
will be considered inside a given polygon, and which sub-regions will not.
The Clipper Library supports 4 filling rules: Even-Odd, Non-Zero, Positive and Negative. These rules are base on the winding numbers (see below) of each polygon sub-region, which in turn are based on the orientation of each path. Orientation is determined by the order in which vertices are declared during path construction, and whether these vertices progress roughly clockwise or counter-clockwise.
By far the most widely used filling rules for polygons are EvenOdd and NonZero, sometimes called Alternate and Winding respectively.
https://en.wikipedia.org/wiki/Nonzero-rule
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
-
Enum Constant Details
-
EvenOdd
Only odd numbered sub-regions are filled -
NonZero
Only non-zero sub-regions are filled -
Positive
Only sub-regions with winding counts > 0 are filled -
Negative
Only sub-regions with winding counts < 0 are filled
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-