[−]Struct ggez::graphics::FillOptions
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
pub const DEFAULT_TOLERANCE: f32
Default flattening tolerance.
pub const DEFAULT_FILL_RULE: FillRule
Default Fill rule.
pub const DEFAULT: FillOptions
pub fn even_odd() -> FillOptions
pub fn tolerance(tolerance: f32) -> FillOptions
pub fn non_zero() -> FillOptions
pub fn with_tolerance(self, tolerance: f32) -> FillOptions
pub fn with_normals(self, normals: bool) -> FillOptions
pub fn assume_no_intersections(self) -> FillOptions
pub fn on_error(self, policy: OnError) -> FillOptions
Trait Implementations
impl Default for FillOptions
fn default() -> FillOptions
impl Debug for FillOptions
impl Copy for FillOptions
impl Clone for FillOptions
fn clone(&self) -> FillOptions
default fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq<FillOptions> for FillOptions
fn eq(&self, other: &FillOptions) -> bool
fn ne(&self, other: &FillOptions) -> bool
Auto Trait Implementations
impl Send for FillOptions
impl Sync for FillOptions
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Scalar for T where
T: Copy + PartialEq<T> + Any + Debug,
[src]
T: Copy + PartialEq<T> + Any + Debug,
impl<T> Same for T
type Output = T
Should always be Self
impl<SS, SP> SupersetOf for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn is_in_subset(&self) -> bool
unsafe fn to_subset_unchecked(&self) -> SS
fn from_subset(element: &SS) -> SP
impl<T> Erased for T
impl<T> SetParameter for T
default fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
Sets value
as a parameter of self
.