Struct ggez::graphics::FillOptions [−]
pub struct FillOptions {
pub tolerance: f32,
pub fill_rule: FillRule,
pub sweep_orientation: Orientation,
pub handle_intersections: bool,
// some fields omitted
}
Expand description
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
.
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
impl FillOptions
impl FillOptions
pub const DEFAULT_TOLERANCE: f32
pub const DEFAULT_TOLERANCE: f32
Default flattening tolerance.
pub const DEFAULT_FILL_RULE: FillRule
pub const DEFAULT_FILL_RULE: FillRule
Default Fill rule.
pub const DEFAULT_SWEEP_ORIENTATION: Orientation
pub const DEFAULT_SWEEP_ORIENTATION: Orientation
Default orientation.
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_fill_rule(self, rule: FillRule) -> FillOptions
pub fn with_sweep_orientation(self, orientation: Orientation) -> FillOptions
pub fn with_intersections(self, intersections: bool) -> FillOptions
Trait Implementations
impl Clone for FillOptions
impl Clone for FillOptions
pub fn clone(&self) -> FillOptions
pub fn clone(&self) -> FillOptions
Returns a copy of the value. Read more
Performs copy-assignment from source
. Read more
impl Debug for FillOptions
impl Debug for FillOptions
impl Default for FillOptions
impl Default for FillOptions
pub fn default() -> FillOptions
pub fn default() -> FillOptions
Returns the “default value” for a type. Read more
impl PartialEq<FillOptions> for FillOptions
impl PartialEq<FillOptions> for FillOptions
pub fn eq(&self, other: &FillOptions) -> bool
pub fn eq(&self, other: &FillOptions) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
pub fn ne(&self, other: &FillOptions) -> bool
pub fn ne(&self, other: &FillOptions) -> bool
This method tests for !=
.
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
Mutably borrows from an owned value. Read more