pub enum FillRule {
EvenOdd,
NonZero,
}Expand description
What a layer does at compositing, for painting a scene by hand. Which points a filled path covers, where its contours cross or nest.
A point is inside when a ray from it crosses the outline an odd number of times
(EvenOdd), or when the outline winds round it on balance
(NonZero). The two agree on a simple shape and differ on a
self-crossing one or on nested contours drawn the same way round: even-odd makes a hole
of every second one, non-zero fills them unless they turn the other way.
Even-odd is the default because it is what every path here has always been filled with. Vector artwork (SVG, Lottie) says which it wants, and is mostly non-zero.
Variants§
EvenOdd
Inside where a ray from the point crosses the outline an odd number of times.
NonZero
Inside where the outline winds round the point on balance.