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.
Members
new
fn new() -> Self
Creates an easing with the default control points (0, 0) and
(1, 1), which is a linear easing.
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].
with_key_spline
fn with_key_spline(key_spline: Ref<KeySpline>) -> Self
Creates an easing that uses key_spline.
x1
fn x1(self: &Self) -> f64
X coordinate of the first control point.
set_x1
fn set_x1(self: &Self, value: f64)
y1
fn y1(self: &Self) -> f64
Y coordinate of the first control point.
set_y1
fn set_y1(self: &Self, value: f64)
x2
fn x2(self: &Self) -> f64
X coordinate of the second control point.
set_x2
fn set_x2(self: &Self, value: f64)
y2
fn y2(self: &Self) -> f64
Y coordinate of the second control point.
set_y2
fn set_y2(self: &Self, value: f64)
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeAnyValueClassDefaultsBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyErasedDestructorIntoEitherFrom<SplineEasing>DefaultIEasingPartialEqMarkupTypedValueTypeRegistration
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.