enum Gsk::FillRule

Overview

Specifies how paths are filled.

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.)

New entries may be added in future versions.

Defined in:

lib/gi-crystal/src/auto/gsk-4.0/gsk.cr

Enum Members

Winding = 0_u32

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.

EvenOdd = 1_u32

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.

Class Method Summary

Instance Method Summary

Class methods inherited from struct Enum

g_type : UInt64 g_type

Class Method Detail

def self.g_type : UInt64 #

Returns the type id (GType) registered in GLib type system.


Instance Method Detail

def even_odd? #

def winding? #