Logo Euclid.Kontur

FillRule Type

On Euclid.Kontur. Determines how the winding number of a point decides whether the point is inside a Kontur./// The winding number counts how often the paths of a Kontur wind around a point, counter clockwise turns count +1, clockwise turns count -1. The fill rule belongs to the Kontur, not to the boolean operation, unlike in Clipper. Subject and clip get separate winding numbers on every edge, and each fill rule is applied to its own winding number before the boolean combines them. So two different fill rules never conflict, they are two independent decisions. What this buys is one pass instead of two: an EvenOdd glyph unioned with a NonZero CAD outline works in one operation. With a fill rule per operation the glyph would have to be simplified first, then unioned.

Record fields

Record Field Description

EvenOdd

Full Usage: EvenOdd

Field type: FillRule
Modifiers: static

A point is inside if the winding number is odd. The orientation of the paths does not matter. This is the rule of fonts and of SVG's 'evenodd'. A path inside a path is a hole, a path inside that is filled again.

Field type: FillRule

Negative

Full Usage: Negative

Field type: FillRule
Modifiers: static

A point is inside if the winding number is negative. Needs consistently oriented paths: clockwise outer boundaries, counter clockwise holes.

Field type: FillRule

NonZero

Full Usage: NonZero

Field type: FillRule
Modifiers: static

A point is inside if the winding number is not zero. Overlapping paths of the same orientation merge. This is the rule of SVG's 'nonzero' and the default of most CAD software.

Field type: FillRule

Positive

Full Usage: Positive

Field type: FillRule
Modifiers: static

A point is inside if the winding number is positive. Needs consistently oriented paths: counter clockwise outer boundaries, clockwise holes. Kontur values returned by a boolean operation always use this rule.

Field type: FillRule

Type something to start searching.