Struct lyon::bezier::CubicBezierSegment [] [src]

pub struct CubicBezierSegment {
    pub from: TypedPoint2D<f32, UnknownUnit>,
    pub ctrl1: TypedPoint2D<f32, UnknownUnit>,
    pub ctrl2: TypedPoint2D<f32, UnknownUnit>,
    pub to: TypedPoint2D<f32, UnknownUnit>,
}

A 2d curve segment defined by four points: the beginning of the segment, two control points and the end of the segment.

The curve is defined by equation:² ∀ t ∈ [0..1], P(t) = (1 - t)³ * from + 3 * (1 - t)² * t * ctrl1 + 3 * t² * (1 - t) * ctrl2 + t³ * to

Fields

Methods

impl CubicBezierSegment
[src]

[src]

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

[src]

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

[src]

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

[src]

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

[src]

Sample the x coordinate of the curve's derivative at t (expecting t between 0 and 1).

[src]

Sample the y coordinate of the curve's derivative at t (expecting t between 0 and 1).

[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]

Applies the transform to this curve and returns the results.

[src]

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

[src]

Iterates through the curve invoking a callback at each point.

[src]

Compute the length of the segment using a flattened approximation.

[src]

[src]

Return local x extrema or None if this curve is monotone.

This returns the advancements along the curve, not the actual x position.

[src]

Return local y extrema or None if this curve is monotone.

This returns the advancements along the curve, not the actual y position.

[src]

Find the advancement of the y-most position in the curve.

This returns the advancement along the curve, not the actual y position.

[src]

Find the advancement of the y-least position in the curve.

This returns the advancement along the curve, not the actual y position.

[src]

Find the advancement of the x-most position in the curve.

This returns the advancement along the curve, not the actual x position.

[src]

Find the x-least position in the curve.

[src]

Returns a rectangle the curve is contained in

[src]

Returns the smallest rectangle the curve is contained in

[src]

Cast this curve into a x-montone curve without checking that the monotonicity assumption is correct.

[src]

Cast this curve into a y-montone curve without checking that the monotonicity assumption is correct.

[src]

[src]

Trait Implementations

impl Copy for CubicBezierSegment
[src]

impl Clone for CubicBezierSegment
[src]

impl Debug for CubicBezierSegment
[src]

[src]