[−][src]Trait lyon_geom::Segment
Common APIs to segment types.
Associated Types
Loading content...Required methods
pub fn from(&self) -> Point<Self::Scalar>
[src]
Start of the curve.
pub fn to(&self) -> Point<Self::Scalar>
[src]
End of the curve.
pub fn sample(&self, t: Self::Scalar) -> Point<Self::Scalar>
[src]
Sample the curve at t (expecting t between 0 and 1).
pub fn derivative(&self, t: Self::Scalar) -> Vector<Self::Scalar>
[src]
Sample the derivative at t (expecting t between 0 and 1).
pub fn split(&self, t: Self::Scalar) -> (Self, Self)
[src]
Split this curve into two sub-curves.
pub fn before_split(&self, t: Self::Scalar) -> Self
[src]
Return the curve before the split point.
pub fn after_split(&self, t: Self::Scalar) -> Self
[src]
Return the curve after the split point.
pub fn split_range(&self, t_range: Range<Self::Scalar>) -> Self
[src]
Return the curve inside a given range of t.
This is equivalent splitting at the range's end points.
pub fn flip(&self) -> Self
[src]
Swap the direction of the segment.
pub fn approximate_length(&self, tolerance: Self::Scalar) -> Self::Scalar
[src]
Compute the length of the segment using a flattened approximation.
Provided methods
pub fn x(&self, t: Self::Scalar) -> Self::Scalar
[src]
Sample x at t (expecting t between 0 and 1).
pub fn y(&self, t: Self::Scalar) -> Self::Scalar
[src]
Sample y at t (expecting t between 0 and 1).
pub fn dx(&self, t: Self::Scalar) -> Self::Scalar
[src]
Sample x derivative at t (expecting t between 0 and 1).
pub fn dy(&self, t: Self::Scalar) -> Self::Scalar
[src]
Sample y derivative at t (expecting t between 0 and 1).