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>

source

pub fn position(&self) -> Point

The vertex position.

source

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).

source

pub fn position_on_path(&self) -> Point

Position of this vertex on the path, unaffected by the line width.

source

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.

source

pub fn advancement(&self) -> f32

How far along the path this vertex is.

source

pub fn side(&self) -> Side

Whether the vertex is on the positive or negative side of the path.

source

pub fn source(&self) -> VertexSource

Returns the source of this vertex.

source

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.

Auto Trait Implementations§

§

impl<'a, 'b> !RefUnwindSafe for StrokeVertex<'a, 'b>

§

impl<'a, 'b> !Send for StrokeVertex<'a, 'b>

§

impl<'a, 'b> !Sync for StrokeVertex<'a, 'b>

§

impl<'a, 'b> Unpin for StrokeVertex<'a, 'b>

§

impl<'a, 'b> !UnwindSafe for StrokeVertex<'a, 'b>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.