FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    SplineEasing

    struct · ferroui-base · v0.5.0

    struct SplineEasing
    

    Eases a value using a user-defined cubic bezier curve. Good for custom easing functions that are not possible with the built-in ones.

    View source

    Members

    new

    fn new() -> Self
    

    Creates an easing with the default control points (0, 0) and (1, 1), which is a linear easing.

    Source

    with_points

    fn with_points(x1: f64, y1: f64, x2: f64, y2: f64) -> Self
    

    Creates an easing with the given control points. Panics when an X coordinate is outside [0, 1].

    Source

    with_key_spline

    fn with_key_spline(key_spline: Ref<KeySpline>) -> Self
    

    Creates an easing that uses key_spline.

    Source

    x1

    fn x1(self: &Self) -> f64
    

    X coordinate of the first control point.

    Source

    set_x1

    fn set_x1(self: &Self, value: f64)
    

    Source

    y1

    fn y1(self: &Self) -> f64
    

    Y coordinate of the first control point.

    Source

    set_y1

    fn set_y1(self: &Self, value: f64)
    

    Source

    x2

    fn x2(self: &Self) -> f64
    

    X coordinate of the second control point.

    Source

    set_x2

    fn set_x2(self: &Self, value: f64)
    

    Source

    y2

    fn y2(self: &Self) -> f64
    

    Y coordinate of the second control point.

    Source

    set_y2

    fn set_y2(self: &Self, value: f64)
    

    Source

    Trait implementations

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.