pub struct Path { /* private fields */ }Expand description
A sequence of drawing commands describing one or more sub-paths.
A path is the unit of geometry in the chart renderer: axes, series polylines, pie slices, radar rings, and text decorations are all expressed as paths. Paths are immutable once built — the builder produces the final command buffer, and the tessellator consumes it without mutating it.
Implementations§
Source§impl Path
Inherent implementation of Path.
impl Path
Inherent implementation of Path.
Sourcepub fn builder() -> PathBuilder
pub fn builder() -> PathBuilder
Sourcepub fn commands(&self) -> &[PathCommand]
pub fn commands(&self) -> &[PathCommand]
Sourcepub fn fill_rule(&self) -> FillRule
pub fn fill_rule(&self) -> FillRule
Returns the rule used to decide which parts of the path are inside.
§Returns
FillRule- AFillRulevalue.
Sourcepub fn bounds(&self) -> BBox
pub fn bounds(&self) -> BBox
Returns the tightest axis-aligned box containing the path.
The bounds are computed from the control points of every curve, which is a conservative over-estimate for Béziers — the true extremum of a curve lies strictly inside the control polygon. Over-estimating is the safe direction for culling: a shape is never culled when it should be drawn.
§Returns
BBox- ABBoxvalue.