Struct tiny_skia_path::dash::ContourMeasure

source ·
struct ContourMeasure {
    segments: Vec<Segment>,
    points: Vec<Point>,
    length: f32,
    is_closed: bool,
}

Fields§

§segments: Vec<Segment>§points: Vec<Point>§length: f32§is_closed: bool

Implementations§

source§

impl ContourMeasure

source

fn push_segment( &self, start_d: f32, stop_d: f32, start_with_move_to: bool, pb: &mut PathBuilder, )

source

fn distance_to_segment(&self, distance: f32) -> Option<(usize, NormalizedF32)>

source

fn compute_line_seg( &mut self, p0: Point, p1: Point, distance: f32, point_index: usize, ) -> f32

source

fn compute_quad_segs( &mut self, p0: Point, p1: Point, p2: Point, distance: f32, min_t: u32, max_t: u32, point_index: usize, tolerance: f32, ) -> f32

source

fn compute_cubic_segs( &mut self, p0: Point, p1: Point, p2: Point, p3: Point, distance: f32, min_t: u32, max_t: u32, point_index: usize, tolerance: f32, ) -> f32

Trait Implementations§

source§

impl Debug for ContourMeasure

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for ContourMeasure

source§

fn default() -> ContourMeasure

Returns the “default value” for a type. Read more

Auto Trait Implementations§

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>,

source§

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>,

source§

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.