pub trait SetFill: Sized {
// Required method
fn fill_options_mut(&mut self) -> &mut FillOptions;
// Provided methods
fn fill_opts(self, opts: FillOptions) -> Self { ... }
fn fill_tolerance(self, tolerance: f32) -> Self { ... }
fn fill_rule(self, rule: FillRule) -> Self { ... }
fn fill_sweep_orientation(self, orientation: Orientation) -> Self { ... }
fn handle_intersections(self, handle: bool) -> Self { ... }
}
Expand description
Nodes that support fill tessellation.
This trait allows the Drawing
context to automatically provide an implementation of the
following builder methods for all primitives that provide some fill tessellation options.
Required Methods§
sourcefn fill_options_mut(&mut self) -> &mut FillOptions
fn fill_options_mut(&mut self) -> &mut FillOptions
Provide a mutable reference to the FillOptions
field.
Provided Methods§
sourcefn fill_opts(self, opts: FillOptions) -> Self
fn fill_opts(self, opts: FillOptions) -> Self
Specify the whole set of fill tessellation options.
sourcefn fill_tolerance(self, tolerance: f32) -> Self
fn fill_tolerance(self, tolerance: f32) -> Self
Maximum allowed distance to the path when building an approximation.
sourcefn fill_rule(self, rule: FillRule) -> Self
fn fill_rule(self, rule: FillRule) -> Self
Specify the rule used to determine what is inside and what is outside of the shape.
Currently, only the EvenOdd
rule is implemented.
sourcefn fill_sweep_orientation(self, orientation: Orientation) -> Self
fn fill_sweep_orientation(self, orientation: Orientation) -> Self
Whether to perform a vertical or horizontal traversal of the geometry.
Default value: Vertical
.
sourcefn handle_intersections(self, handle: bool) -> Self
fn handle_intersections(self, handle: bool) -> Self
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
.