Struct lyon::tessellation::FillOptions [−][src]
pub struct FillOptions { pub tolerance: f32, pub fill_rule: FillRule, pub compute_normals: bool, pub assume_no_intersections: bool, pub on_error: OnError, // some fields omitted }
Parameters for the fill tessellator.
Fields
tolerance: f32
Maximum allowed distance to the path when building an approximation.
Default value: FillOptions::DEFAULT_TOLERANCE
.
fill_rule: FillRule
Set the fill rule.
See the SVG specification.
Currently, only the EvenOdd
rule is implemented.
Default value: EvenOdd
.
compute_normals: bool
Whether or not to compute the normal vector at each vertex.
When set to false, all generated vertex normals are equal to vector(0.0, 0.0)
.
Not computing vertex normals can speed up tessellation and enable generating less vertices
at intersections.
Default value: true
.
assume_no_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 true
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: false
.
on_error: OnError
What to do if the tessellator detects an error.
Methods
impl FillOptions
[src]
impl FillOptions
pub const DEFAULT_TOLERANCE: f32
DEFAULT_TOLERANCE: f32 = 0.1
Default flattening tolerance.
pub const DEFAULT_FILL_RULE: FillRule
DEFAULT_FILL_RULE: FillRule = FillRule::EvenOdd
Default Fill rule.
pub const DEFAULT: FillOptions
DEFAULT: FillOptions = FillOptions{tolerance: <Self>::DEFAULT_TOLERANCE, fill_rule: <Self>::DEFAULT_FILL_RULE, compute_normals: true, assume_no_intersections: false, on_error: <OnError>::DEFAULT, _private: (),}
pub fn even_odd() -> FillOptions
[src]
pub fn even_odd() -> FillOptions
pub fn tolerance(tolerance: f32) -> FillOptions
[src]
pub fn tolerance(tolerance: f32) -> FillOptions
pub fn non_zero() -> FillOptions
[src]
pub fn non_zero() -> FillOptions
pub fn with_tolerance(self, tolerance: f32) -> FillOptions
[src]
pub fn with_tolerance(self, tolerance: f32) -> FillOptions
pub fn with_normals(self, normals: bool) -> FillOptions
[src]
pub fn with_normals(self, normals: bool) -> FillOptions
pub fn assume_no_intersections(self) -> FillOptions
[src]
pub fn assume_no_intersections(self) -> FillOptions
pub fn on_error(self, policy: OnError) -> FillOptions
[src]
pub fn on_error(self, policy: OnError) -> FillOptions
Trait Implementations
impl Clone for FillOptions
[src]
impl Clone for FillOptions
fn clone(&self) -> FillOptions
[src]
fn clone(&self) -> FillOptions
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Default for FillOptions
[src]
impl Default for FillOptions
fn default() -> FillOptions
[src]
fn default() -> FillOptions
Returns the "default value" for a type. Read more
impl Debug for FillOptions
[src]
impl Debug for FillOptions
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter. Read more
impl Copy for FillOptions
[src]
impl Copy for FillOptions
impl PartialEq<FillOptions> for FillOptions
[src]
impl PartialEq<FillOptions> for FillOptions
fn eq(&self, other: &FillOptions) -> bool
[src]
fn eq(&self, other: &FillOptions) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &FillOptions) -> bool
[src]
fn ne(&self, other: &FillOptions) -> bool
This method tests for !=
.
Auto Trait Implementations
impl Send for FillOptions
impl Send for FillOptions
impl Sync for FillOptions
impl Sync for FillOptions