Struct lyon_tessellation::FillOptions
source · #[non_exhaustive]pub struct FillOptions {
pub tolerance: f32,
pub fill_rule: FillRule,
pub sweep_orientation: Orientation,
pub handle_intersections: bool,
}
Expand description
Parameters for the fill tessellator.
Fields (Non-exhaustive)
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.tolerance: f32
Maximum allowed distance to the path when building an approximation.
Default value: FillOptions::DEFAULT_TOLERANCE
.
fill_rule: FillRule
sweep_orientation: Orientation
Whether to perform a vertical or horizontal traversal of the geometry.
Default value: Vertical
.
handle_intersections: bool
A fast path to avoid some expensive operations if the path is known to not have any self-intersections.
Do not set this to false
if the path may have intersecting edges else
the tessellator may panic or produce incorrect results. In doubt, do not
change the default value.
Default value: true
.
Implementations
sourceimpl FillOptions
impl FillOptions
sourcepub const DEFAULT_TOLERANCE: f32 = 0.100000001f32
pub const DEFAULT_TOLERANCE: f32 = 0.100000001f32
Default flattening tolerance.
sourcepub const DEFAULT_FILL_RULE: FillRule = FillRule::EvenOdd
pub const DEFAULT_FILL_RULE: FillRule = FillRule::EvenOdd
Default Fill rule.
sourcepub const DEFAULT_SWEEP_ORIENTATION: Orientation = Orientation::Vertical
pub const DEFAULT_SWEEP_ORIENTATION: Orientation = Orientation::Vertical
Default orientation.
pub const DEFAULT: Self = _
pub fn even_odd() -> Self
pub fn tolerance(tolerance: f32) -> Self
pub fn non_zero() -> Self
pub const fn with_tolerance(self, tolerance: f32) -> Self
pub const fn with_fill_rule(self, rule: FillRule) -> Self
pub const fn with_sweep_orientation(self, orientation: Orientation) -> Self
pub const fn with_intersections(self, intersections: bool) -> Self
Trait Implementations
sourceimpl Clone for FillOptions
impl Clone for FillOptions
sourcefn clone(&self) -> FillOptions
fn clone(&self) -> FillOptions
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for FillOptions
impl Debug for FillOptions
sourceimpl Default for FillOptions
impl Default for FillOptions
sourceimpl PartialEq<FillOptions> for FillOptions
impl PartialEq<FillOptions> for FillOptions
sourcefn eq(&self, other: &FillOptions) -> bool
fn eq(&self, other: &FillOptions) -> bool
impl Copy for FillOptions
impl StructuralPartialEq for FillOptions
Auto Trait Implementations
impl RefUnwindSafe for FillOptions
impl Send for FillOptions
impl Sync for FillOptions
impl Unpin for FillOptions
impl UnwindSafe for FillOptions
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more