Struct lyon_algorithms::hatching::HatchingOptions
source · #[non_exhaustive]pub struct HatchingOptions {
pub tolerance: f32,
pub angle: Angle,
pub compute_tangents: bool,
pub uv_origin: Point,
}
Expand description
Parameters for the hatcher.
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: HatchingOptions::DEFAULT_TOLERANCE
.
angle: Angle
Angle between the hatching pattern and the x axis.
Default value: HatchingOptions::ANGLE
.
compute_tangents: bool
Whether to compute the tangent of the outline where it meets the hatching pattern.
Default value: `true, .
uv_origin: Point
The origin of the rotated uv coordinates.
Implementations§
source§impl HatchingOptions
impl HatchingOptions
sourcepub const DEFAULT_TOLERANCE: f32 = 0.100000001f32
pub const DEFAULT_TOLERANCE: f32 = 0.100000001f32
Default flattening tolerance.
sourcepub const DEFAULT_ANGLE: Angle = _
pub const DEFAULT_ANGLE: Angle = _
Default hatching angle.
pub const DEFAULT_UV_ORIGIN: Point = _
pub const DEFAULT: Self = _
pub fn tolerance(tolerance: f32) -> Self
pub fn angle(angle: Angle) -> Self
pub fn with_tolerance(self, tolerance: f32) -> Self
pub fn with_angle(self, angle: Angle) -> Self
pub fn with_tangents(self, compute_tangents: bool) -> Self
Trait Implementations§
source§impl Clone for HatchingOptions
impl Clone for HatchingOptions
source§fn clone(&self) -> HatchingOptions
fn clone(&self) -> HatchingOptions
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for HatchingOptions
impl Debug for HatchingOptions
source§impl Default for HatchingOptions
impl Default for HatchingOptions
source§impl PartialEq for HatchingOptions
impl PartialEq for HatchingOptions
source§fn eq(&self, other: &HatchingOptions) -> bool
fn eq(&self, other: &HatchingOptions) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for HatchingOptions
impl StructuralPartialEq for HatchingOptions
Auto Trait Implementations§
impl RefUnwindSafe for HatchingOptions
impl Send for HatchingOptions
impl Sync for HatchingOptions
impl Unpin for HatchingOptions
impl UnwindSafe for HatchingOptions
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