- All Implemented Interfaces:
Serializable
,Comparable<FillRule>
,Constable
cairo_fill_rule_t is used to select how paths are filled. For both fill
rules, whether or not a point is included in the fill is determined by taking
a ray from that point to infinity and looking at intersections with the path.
The ray can be in any direction, as long as it doesn't pass through the end
point of a segment or have a tricky intersection such as intersecting tangent
to the path. (Note that filling is not actually implemented in this way. This
is just a description of the rule that is applied.)
The default fill rule is CAIRO_FILL_RULE_WINDING.
New entries may be added in future versions.
- Since:
- 1.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.gnome.glib.Type
getType()
Get the CairoFillRule GTypeint
getValue()
Return the value of this enumstatic FillRule
of
(int ordinal) Returns the enum constant for the given ordinal (its position in the enum declaration).static FillRule
Returns the enum constant of this class with the specified name.static FillRule[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
WINDING
If the path crosses the ray from left-to-right, counts +1. If the path crosses the ray from right to left, counts -1. (Left and right are determined from the perspective of looking along the ray from the starting point.) If the total count is non-zero, the point will be filled.- Since:
- 1.0
-
EVEN_ODD
Counts the total number of intersections, without regard to the orientation of the contour. If the total number of intersections is odd, the point will be filled.- Since:
- 1.0
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-
getValue
public int getValue()Return the value of this enum- Returns:
- the value
-
of
Returns the enum constant for the given ordinal (its position in the enum declaration).- Parameters:
ordinal
- the position in the enum declaration, starting from zero- Returns:
- the enum constant for the given ordinal
-
getType
public static org.gnome.glib.Type getType()Get the CairoFillRule GType- Returns:
- the GType
-