Skip to main content

StepEasingFunction

Struct StepEasingFunction 

Source
pub struct StepEasingFunction { /* private fields */ }
Expand description

A function that advances in steps (WinUI StepEasingFunction). The output is step / step_count for a step between initial_step and final_step.

Implementations§

Source§

impl StepEasingFunction

Source

pub fn new() -> StepEasingFunction

A function with one step.

Source

pub fn with_step_count(step_count: i32) -> StepEasingFunction

A function with step_count steps.

Source

pub fn step_count(&self) -> i32

The number of steps between the starting value and the end value.

Source

pub fn set_step_count(&self, value: i32)

Source

pub fn initial_step(&self) -> i32

The step to start at (0 by default).

Source

pub fn set_initial_step(&self, value: i32)

Source

pub fn final_step(&self) -> i32

The step to end at: the step count until it is set.

Source

pub fn set_final_step(&self, value: i32)

Source

pub fn is_initial_step_single_frame(&self) -> bool

Whether the initial step lasts the smallest possible duration.

Source

pub fn set_is_initial_step_single_frame(&self, value: bool)

Source

pub fn is_final_step_single_frame(&self) -> bool

Whether the final step lasts the smallest possible duration.

Source

pub fn set_is_final_step_single_frame(&self, value: bool)

Trait Implementations§

Source§

impl Default for StepEasingFunction

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl From<StepEasingFunction> for Easing

Source§

fn from(value: StepEasingFunction) -> Easing

Converts to this type from the input type.
Source§

impl IEasing for StepEasingFunction

Source§

fn to_shared(&self) -> Arc<SharedEasing> ⓘ

A copy with the members the function has now.

Source§

fn ease(&self, progress: f64) -> f64

Returns the transformed value for a linear progress.
Source§

fn derives_from_easing(&self) -> bool

Whether the object is an easing class: upstream, a class deriving from the Easing base class, which code tests for with a cast. True for every easing of this module and by default, because implementing this trait is how an easing class is written here; an object that stands for a bare implementation of the contract (not an easing class) answers false.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> ClassDefaults for T
where T: ?Sized,

Source§

fn static_constructor()

The static constructor of a type: work done once per thread, after the properties of the type are registered and before its first instance exists (class handlers, affects_render, metadata overrides). Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.