[][src]Struct makepad_geometry::quadratic_segment::QuadraticSegment

#[repr(C)]
pub struct QuadraticSegment {
    pub p0: Point,
    pub p1: Point,
    pub p2: Point,
}

A quadratic bezier curve segment in 2-dimensional Euclidian space.

Fields

p0: Pointp1: Pointp2: Point

Methods

impl QuadraticSegment[src]

pub fn new(p0: Point, p1: Point, p2: Point) -> QuadraticSegment[src]

Creates a new quadratic bezier curve segment with the given control points.

pub fn is_approximately_linear(self, epsilon: f32) -> bool[src]

Returns true if self is approximately linear with tolerance epsilon.

pub fn split(self, t: f32) -> (QuadraticSegment, QuadraticSegment)[src]

Splits self into two quadratic Bezier curve segments, at parameter t.

pub fn linearize(self, epsilon: f32) -> Linearize[src]

Returns an iterator over the points of a polyline that approximates self with tolerance epsilon, excluding the first point.

Trait Implementations

impl Transform for QuadraticSegment[src]

impl Clone for QuadraticSegment[src]

impl Copy for QuadraticSegment[src]

impl PartialEq<QuadraticSegment> for QuadraticSegment[src]

impl Debug for QuadraticSegment[src]

impl StructuralPartialEq for QuadraticSegment[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = !

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]