Trait components::AnimatableExt [−][src]
pub trait AnimatableExt: 'static {
pub fn find_property(&self, property_name: &str) -> Option<ParamSpec>;
pub fn get_initial_state(&self, property_name: &str, value: &mut Value);
pub fn interpolate_value<P>(
&self,
property_name: &str,
interval: &P,
progress: f64
) -> Option<Value>
where
P: IsA<Interval>;
pub 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
pub 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
pub 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
pub fn interpolate_value<P>(
&self,
property_name: &str,
interval: &P,
progress: f64
) -> Option<Value> where
P: IsA<Interval>, [src]
&self,
property_name: &str,
interval: &P,
progress: f64
) -> Option<Value> where
P: IsA<Interval>,
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
pub 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
Implementors
impl<O> AnimatableExt for O where
O: IsA<Animatable>, [src]
impl<O> AnimatableExt for O where
O: IsA<Animatable>, [src]pub fn find_property(&self, property_name: &str) -> Option<ParamSpec>[src]
pub fn get_initial_state(&self, property_name: &str, value: &mut Value)[src]
pub fn interpolate_value<P>(
&self,
property_name: &str,
interval: &P,
progress: f64
) -> Option<Value> where
P: IsA<Interval>, [src]
&self,
property_name: &str,
interval: &P,
progress: f64
) -> Option<Value> where
P: IsA<Interval>,