Struct lyon_geom::LineSegment [−][src]
Expand description
A linear segment.
Fields
from: Point<S>
to: Point<S>
Implementations
Sample the x coordinate of the segment at t (expecting t between 0 and 1).
Sample the y coordinate of the segment at t (expecting t between 0 and 1).
Returns an inverted version of this segment where the beginning and the end points are swapped.
Return the sub-segment inside a given range of t.
This is equivalent splitting at the range’s end points.
Return the segment before the split point.
Return the segment after the split point.
Return the minimum bounding rectangle
Returns the vector between this segment’s from
and to
points.
Changes the segment’s length, moving destination point.
Applies the transform to this segment and returns the results.
Computes the intersection (if any) between this segment and another one.
The result is provided in the form of the t
parameter of each
segment. To get the intersection point, sample one of the segments
at the corresponding value.
Trait Implementations
Performs the conversion.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl<S> RefUnwindSafe for LineSegment<S> where
S: RefUnwindSafe,
impl<S> Send for LineSegment<S> where
S: Send,
impl<S> Sync for LineSegment<S> where
S: Sync,
impl<S> Unpin for LineSegment<S> where
S: Unpin,
impl<S> UnwindSafe for LineSegment<S> where
S: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more