Struct lyon_geom::LineSegment [] [src]

pub struct LineSegment<S> {
    pub from: Point<S>,
    pub to: Point<S>,
}

A linear segment.

Fields

Methods

impl<S: Scalar> LineSegment<S>
[src]

[src]

Sample the segment at t (expecting t between 0 and 1).

[src]

Sample the x coordinate of the segment at t (expecting t between 0 and 1).

[src]

Sample the y coordinate of the segment at t (expecting t between 0 and 1).

[src]

[src]

[src]

[src]

[src]

[src]

[src]

Returns an inverted version of this segment where the beginning and the end points are swapped.

[src]

Return the sub-segment inside a given range of t.

This is equivalent splitting at the range's end points.

[src]

Split this curve into two sub-segments.

[src]

Return the segment before the split point.

[src]

Return the segment after the split point.

[src]

[src]

Return the minimum bounding rectangle

[src]

Returns the vector between this segment's from and to points.

[src]

Returns the line containing this segment.

[src]

Computes the length of this segment.

[src]

[src]

Applies the transform to this segment and returns the results.

[src]

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.

[src]

[src]

Trait Implementations

impl<S: Copy> Copy for LineSegment<S>
[src]

impl<S: Clone> Clone for LineSegment<S>
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<S: Debug> Debug for LineSegment<S>
[src]

[src]

Formats the value using the given formatter.

impl<S: PartialEq> PartialEq for LineSegment<S>
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl<S: Scalar> Segment for LineSegment<S>
[src]

[src]

Start of the curve.

[src]

End of the curve.

[src]

Sample the curve at t (expecting t between 0 and 1).

[src]

Sample x at t (expecting t between 0 and 1).

[src]

Sample y at t (expecting t between 0 and 1).

[src]

Sample the derivative at t (expecting t between 0 and 1).

[src]

Sample x derivative at t (expecting t between 0 and 1).

[src]

Sample y derivative at t (expecting t between 0 and 1).

[src]

Return the curve inside a given range of t. Read more

[src]

Split this curve into two sub-curves.

[src]

Return the curve before the split point.

[src]

Return the curve after the split point.

[src]

Swap the direction of the segment.

[src]

Compute the length of the segment using a flattened approximation.

impl<S: Scalar> FlatteningStep for LineSegment<S>
[src]

[src]

Find the interval of the begining of the curve that can be approximated with a line segment. Read more

[src]

Returns the flattened representation of the curve as an iterator, starting after the current point. Read more