[][src]Struct makepad_geometry::LineSegment

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

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

Fields

p0: Pointp1: Point

Methods

impl LineSegment[src]

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

Creates a new line segment with the given endpoints.

pub fn compare_to_point(self, p: Point) -> Option<Ordering>[src]

Compares self to the point p.

Returns Ordering::Less if self lies below p, Ordering::Greater if self lies above p, and Ordering::Equal if self is incident to p.

pub fn intersect_with_vertical_line(self, x: f32) -> Option<Point>[src]

Returns the intersection point of the supporting line of self with the vertical line through x, or None if these lines are coincident.

Trait Implementations

impl Transform for LineSegment[src]

impl Clone for LineSegment[src]

impl Copy for LineSegment[src]

impl PartialEq<LineSegment> for LineSegment[src]

impl Debug for LineSegment[src]

impl StructuralPartialEq for LineSegment[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]