#[non_exhaustive]pub enum FillRule {
Winding,
EvenOdd,
}
v4_14
only.Expand description
FillRule
is used to select 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.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
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.
EvenOdd
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.
Trait Implementations§
source§impl<'a> FromValue<'a> for FillRule
impl<'a> FromValue<'a> for FillRule
§type Checker = GenericValueTypeChecker<FillRule>
type Checker = GenericValueTypeChecker<FillRule>
source§unsafe fn from_value(value: &'a Value) -> Self
unsafe fn from_value(value: &'a Value) -> Self
Value
. Read moresource§impl HasParamSpec for FillRule
impl HasParamSpec for FillRule
source§impl Ord for FillRule
impl Ord for FillRule
source§impl PartialEq for FillRule
impl PartialEq for FillRule
source§impl PartialOrd for FillRule
impl PartialOrd for FillRule
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl StaticType for FillRule
impl StaticType for FillRule
source§fn static_type() -> Type
fn static_type() -> Type
Self
.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 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
source§impl<T> IntoClosureReturnValue for T
impl<T> IntoClosureReturnValue for T
fn into_closure_return_value(self) -> Option<Value>
source§impl<T> PropertyGet for Twhere
T: HasParamSpec,
impl<T> PropertyGet for Twhere
T: HasParamSpec,
source§impl<T> StaticTypeExt for Twhere
T: StaticType,
impl<T> StaticTypeExt for Twhere
T: StaticType,
source§fn ensure_type()
fn ensure_type()
source§impl<T> ToSendValue for T
impl<T> ToSendValue for T
source§fn to_send_value(&self) -> SendValue
fn to_send_value(&self) -> SendValue
SendValue
clone of self
.