pub enum FillRule {
EvenOdd,
NonZero,
}Expand description
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.
Trait Implementations§
impl Copy for FillRule
impl Eq for FillRule
impl StructuralPartialEq for FillRule
Auto Trait Implementations§
impl Freeze for FillRule
impl RefUnwindSafe for FillRule
impl Send for FillRule
impl Sync for FillRule
impl Unpin for FillRule
impl UnsafeUnpin for FillRule
impl UnwindSafe for FillRule
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more