Struct makepad_widgets::makepad_vector::geometry::LineSegment
#[repr(C)]pub struct LineSegment {
pub p0: Point,
pub p1: Point,
}Expand description
A quadratic bezier curve segment in 2-dimensional Euclidian space.
Fields§
§p0: Point§p1: PointImplementations§
§impl LineSegment
impl LineSegment
pub fn new(p0: Point, p1: Point) -> LineSegment
pub fn new(p0: Point, p1: Point) -> LineSegment
Creates a new line segment with the given endpoints.
pub fn compare_to_point(self, p: Point) -> Option<Ordering>
pub fn compare_to_point(self, p: Point) -> Option<Ordering>
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: f64) -> Option<Point>
pub fn intersect_with_vertical_line(self, x: f64) -> Option<Point>
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 Clone for LineSegment
impl Clone for LineSegment
§fn clone(&self) -> LineSegment
fn clone(&self) -> LineSegment
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for LineSegment
impl Debug for LineSegment
§impl PartialEq<LineSegment> for LineSegment
impl PartialEq<LineSegment> for LineSegment
§fn eq(&self, other: &LineSegment) -> bool
fn eq(&self, other: &LineSegment) -> bool
This method tests for
self and other values to be equal, and is used
by ==.§impl Transform for LineSegment
impl Transform for LineSegment
fn transform<T>(self, t: &T) -> LineSegmentwhere T: Transformation,
fn transform_mut<T>(&mut self, t: &T)where T: Transformation,
impl Copy for LineSegment
impl StructuralPartialEq for LineSegment
Auto Trait Implementations§
impl RefUnwindSafe for LineSegment
impl Send for LineSegment
impl Sync for LineSegment
impl Unpin for LineSegment
impl UnwindSafe for LineSegment
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more