pub type PathStroke = PathOptions<StrokeOptions>;
Expand description
A stroked path drawing context.
Aliased Type§
struct PathStroke { /* private fields */ }
Implementations§
Trait Implementations§
source§impl SetStroke for PathStroke
impl SetStroke for PathStroke
source§fn stroke_options_mut(&mut self) -> &mut StrokeOptions
fn stroke_options_mut(&mut self) -> &mut StrokeOptions
Provide a mutable reference to the
StrokeOptions
field.source§fn stroke_opts(self, opts: StrokeOptions) -> Self
fn stroke_opts(self, opts: StrokeOptions) -> Self
Specify the whole set of stroke tessellation options.
source§fn start_cap_butt(self) -> Self
fn start_cap_butt(self) -> Self
The stroke for each sub-path does not extend beyond its two endpoints. A zero length
sub-path will therefore not have any stroke.
source§fn start_cap_square(self) -> Self
fn start_cap_square(self) -> Self
At the end of each sub-path, the shape representing the stroke will be extended by a
rectangle with the same width as the stroke width and whose length is half of the stroke
width. If a sub-path has zero length, then the resulting effect is that the stroke for that
sub-path consists solely of a square with side length equal to the stroke width, centered
at the sub-path’s point.
source§fn start_cap_round(self) -> Self
fn start_cap_round(self) -> Self
At each end of each sub-path, the shape representing the stroke will be extended by a half
circle with a radius equal to the stroke width. If a sub-path has zero length, then the
resulting effect is that the stroke for that sub-path consists solely of a full circle
centered at the sub-path’s point.
source§fn end_cap_butt(self) -> Self
fn end_cap_butt(self) -> Self
The stroke for each sub-path does not extend beyond its two endpoints. A zero length
sub-path will therefore not have any stroke.
source§fn end_cap_square(self) -> Self
fn end_cap_square(self) -> Self
At the end of each sub-path, the shape representing the stroke will be extended by a
rectangle with the same width as the stroke width and whose length is half of the stroke
width. If a sub-path has zero length, then the resulting effect is that the stroke for that
sub-path consists solely of a square with side length equal to the stroke width, centered
at the sub-path’s point.
source§fn end_cap_round(self) -> Self
fn end_cap_round(self) -> Self
At each end of each sub-path, the shape representing the stroke will be extended by a half
circle with a radius equal to the stroke width. If a sub-path has zero length, then the
resulting effect is that the stroke for that sub-path consists solely of a full circle
centered at the sub-path’s point.
source§fn caps_butt(self) -> Self
fn caps_butt(self) -> Self
The stroke for each sub-path does not extend beyond its two endpoints. A zero length
sub-path will therefore not have any stroke.
source§fn caps_square(self) -> Self
fn caps_square(self) -> Self
At the end of each sub-path, the shape representing the stroke will be extended by a
rectangle with the same width as the stroke width and whose length is half of the stroke
width. If a sub-path has zero length, then the resulting effect is that the stroke for that
sub-path consists solely of a square with side length equal to the stroke width, centered
at the sub-path’s point.
source§fn caps_round(self) -> Self
fn caps_round(self) -> Self
At each end of each sub-path, the shape representing the stroke will be extended by a half
circle with a radius equal to the stroke width. If a sub-path has zero length, then the
resulting effect is that the stroke for that sub-path consists solely of a full circle
centered at the sub-path’s point.
source§fn join(self, join: LineJoin) -> Self
fn join(self, join: LineJoin) -> Self
The way in which lines are joined at the vertices, matching the SVG spec. Read more
source§fn join_miter(self) -> Self
fn join_miter(self) -> Self
A sharp corner is to be used to join path segments.
source§fn join_miter_clip(self) -> Self
fn join_miter_clip(self) -> Self
Same as a
join_miter
, but if the miter limit is exceeded, the miter is clipped at a miter
length equal to the miter limit value multiplied by the stroke width.source§fn join_round(self) -> Self
fn join_round(self) -> Self
A round corner is to be used to join path segments.
source§fn join_bevel(self) -> Self
fn join_bevel(self) -> Self
A bevelled corner is to be used to join path segments. The bevel shape is a triangle that
fills the area between the two stroked segments.
source§fn stroke_weight(self, stroke_weight: f32) -> Self
fn stroke_weight(self, stroke_weight: f32) -> Self
The total stroke_weight (aka width) of the line.
source§fn miter_limit(self, limit: f32) -> Self
fn miter_limit(self, limit: f32) -> Self
Describes the limit before miter lines will clip, as described in the SVG spec. Read more
source§fn stroke_tolerance(self, tolerance: f32) -> Self
fn stroke_tolerance(self, tolerance: f32) -> Self
Maximum allowed distance to the path when building an approximation.