Skip to main content

CompositionAnimation

Struct CompositionAnimation 

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

This is the base class for ExpressionAnimation and KeyFrameAnimation.

Use the start_animation method of a composition object to start the animation. Value parameters (as opposed to reference parameters which are set using set_reference_parameter) are copied and “embedded” into an expression at the time start_animation is called. Changing the value of the variable after start_animation is called will not affect the value of the ExpressionAnimation. See the remarks of ExpressionAnimation for additional information.

A class derives from it by embedding it (base) and dereferencing to it; the class implements ICompositionAnimation, whose Rc<dyn ..> is the handle of an animation of any class.

Implementations§

Source§

impl CompositionAnimation

Source

pub fn object(&self) -> &CompositionObject

The embedded CompositionObject.

Source

pub fn compositor(&self) -> &Rc<Compositor>

The associated compositor.

Source

pub fn clear_all_parameters(&self)

Clears all of the parameters of the animation.

Source

pub fn clear_parameter(&self, key: &str)

Clears a parameter from the animation.

Source

pub fn set_color_parameter(&self, key: &str, value: Color)

Source

pub fn set_matrix3x2_parameter(&self, key: &str, value: Matrix3x2)

Source

pub fn set_matrix4x4_parameter(&self, key: &str, value: Matrix4x4)

Source

pub fn set_quaternion_parameter(&self, key: &str, value: Quaternion)

Source

pub fn set_reference_parameter( &self, key: &str, composition_object: Rc<dyn AsCompositionObject>, )

Source

pub fn set_scalar_parameter(&self, key: &str, value: f32)

Source

pub fn set_vector2_parameter(&self, key: &str, value: Vector2)

Source

pub fn set_vector3_parameter(&self, key: &str, value: Vector3)

Source

pub fn set_vector4_parameter(&self, key: &str, value: Vector4)

Source

pub fn target(&self) -> Option<String>

The name of the property the animation targets.

Source

pub fn set_target(&self, value: Option<String>)

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.