Struct lyon_tessellation::StrokeVertex
source · pub struct StrokeVertex<'a, 'b>(/* private fields */);
Expand description
Extra vertex information from the StrokeTessellator
accessible when building vertices.
Implementations§
source§impl<'a, 'b> StrokeVertex<'a, 'b>
impl<'a, 'b> StrokeVertex<'a, 'b>
sourcepub fn normal(&self) -> Vector
pub fn normal(&self) -> Vector
Normal at this vertex.
The length of the provided normal is such that displacing the vertex along it inflates the stroke by 2.0 (1.0 on each side).
sourcepub fn position_on_path(&self) -> Point
pub fn position_on_path(&self) -> Point
Position of this vertex on the path, unaffected by the line width.
sourcepub fn line_width(&self) -> f32
pub fn line_width(&self) -> f32
The line width at this vertex.
If a line width modifier is set via StrokeOptions::variable_line_width
, the
returned line width is equal to StrokeOptions::line_width
multiplied by the
line width modifier at this vertex.
sourcepub fn advancement(&self) -> f32
pub fn advancement(&self) -> f32
How far along the path this vertex is.
sourcepub fn source(&self) -> VertexSource
pub fn source(&self) -> VertexSource
Returns the source of this vertex.
sourcepub fn interpolated_attributes(&mut self) -> Attributes<'_>
pub fn interpolated_attributes(&mut self) -> Attributes<'_>
Computes and returns the custom attributes for this vertex.
The attributes are interpolated along the edges on which this vertex is. This can include multiple edges if the vertex is at an intersection.