[−][src]Struct makepad_geometry::LineSegment
A quadratic bezier curve segment in 2-dimensional Euclidian space.
Fields
p0: Point
p1: 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]
fn transform<T>(self, t: &T) -> LineSegment where
T: Transformation,
[src]
T: Transformation,
fn transform_mut<T>(&mut self, t: &T) where
T: Transformation,
[src]
T: Transformation,
impl Clone for LineSegment
[src]
fn clone(&self) -> LineSegment
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for LineSegment
[src]
impl PartialEq<LineSegment> for LineSegment
[src]
fn eq(&self, other: &LineSegment) -> bool
[src]
fn ne(&self, other: &LineSegment) -> bool
[src]
impl Debug for LineSegment
[src]
impl StructuralPartialEq for LineSegment
[src]
Auto Trait Implementations
impl Send for LineSegment
impl Sync for LineSegment
impl Unpin for LineSegment
impl UnwindSafe for LineSegment
impl RefUnwindSafe for LineSegment
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,