Trait animate::AnimatableExt[][src]

pub trait AnimatableExt: 'static {
    fn find_property(&self, property_name: &str) -> Option<ParamSpec>;
fn get_initial_state(&self, property_name: &str, value: &mut Value);
fn interpolate_value<P: IsA<Interval>>(
        &self,
        property_name: &str,
        interval: &P,
        progress: f64
    ) -> Option<Value>;
fn set_final_state(&self, property_name: &str, value: &Value); }

Trait containing all Animatable methods.

Implementors

Actor, Animatable, Box, Clone, Group, Rectangle, ScrollActor, Stage, Text, Texture

Required methods

fn find_property(&self, property_name: &str) -> Option<ParamSpec>[src]

Finds the gobject::ParamSpec for property_name

property_name

the name of the animatable property to find

Returns

The gobject::ParamSpec for the given property or None

fn get_initial_state(&self, property_name: &str, value: &mut Value)[src]

Retrieves the current state of property_name and sets value with it

property_name

the name of the animatable property to retrieve

value

a gobject::Value initialized to the type of the property to retrieve

fn interpolate_value<P: IsA<Interval>>(
    &self,
    property_name: &str,
    interval: &P,
    progress: f64
) -> Option<Value>
[src]

Asks a Animatable implementation to interpolate a a named property between the initial and final values of a Interval, using progress as the interpolation value, and store the result inside value.

This function should be used for every property animation involving Animatables.

This function replaces Animatable::animate_property.

property_name

the name of the property to interpolate

interval

a Interval with the animation range

progress

the progress to use to interpolate between the initial and final values of the interval

value

return location for an initialized gobject::Value using the same type of the interval

Returns

true if the interpolation was successful, and false otherwise

fn set_final_state(&self, property_name: &str, value: &Value)[src]

Sets the current state of property_name to value

property_name

the name of the animatable property to set

value

the value of the animatable property to set

Loading content...

Implementors

impl<O: IsA<Animatable>> AnimatableExt for O[src]

Loading content...