Skip to main content

CompositionPropertySet

Struct CompositionPropertySet 

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

Property sets are composition objects that allow storage of key values pairs that can be shared across the application and are not tied to the lifetime of another composition object. Property sets are most commonly used with animations, where they maintain key-value pairs that are referenced to drive portions of composition animations. Property sets provide the ability to insert key-value pairs or retrieve a value for a given key. A property set does not support a delete function – ensure you use property sets to store values that will be shared across the application.

Implementations§

Source§

impl CompositionPropertySet

Source

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

Source

pub fn insert_color(&self, property_name: &str, value: Color)

Source

pub fn insert_matrix3x2(&self, property_name: &str, value: Matrix3x2)

Source

pub fn insert_matrix4x4(&self, property_name: &str, value: Matrix4x4)

Source

pub fn insert_quaternion(&self, property_name: &str, value: Quaternion)

Source

pub fn insert_scalar(&self, property_name: &str, value: f32)

Source

pub fn insert_vector2(&self, property_name: &str, value: Vector2)

Source

pub fn insert_vector3(&self, property_name: &str, value: Vector3)

Source

pub fn insert_vector4(&self, property_name: &str, value: Vector4)

Source

pub fn try_get_color( &self, property_name: &str, ) -> (CompositionGetValueStatus, Color)

Source

pub fn try_get_matrix3x2( &self, property_name: &str, ) -> (CompositionGetValueStatus, Matrix3x2)

Source

pub fn try_get_matrix4x4( &self, property_name: &str, ) -> (CompositionGetValueStatus, Matrix4x4)

Source

pub fn try_get_quaternion( &self, property_name: &str, ) -> (CompositionGetValueStatus, Quaternion)

Source

pub fn try_get_scalar( &self, property_name: &str, ) -> (CompositionGetValueStatus, f32)

Source

pub fn try_get_vector2( &self, property_name: &str, ) -> (CompositionGetValueStatus, Vector2)

Source

pub fn try_get_vector3( &self, property_name: &str, ) -> (CompositionGetValueStatus, Vector3)

Source

pub fn try_get_vector4( &self, property_name: &str, ) -> (CompositionGetValueStatus, Vector4)

Source

pub fn insert_boolean(&self, property_name: &str, value: bool)

Source

pub fn try_get_boolean( &self, property_name: &str, ) -> (CompositionGetValueStatus, bool)

Trait Implementations§

Source§

impl AsCompositionObject for CompositionPropertySet

Source§

fn as_composition_object(&self) -> &CompositionObject

The embedded CompositionObject.
Source§

fn composition_type_name(&self) -> &'static str

The name of the class of the object, for messages.
Source§

fn as_property_set(self: Rc<Self>) -> Option<Rc<CompositionPropertySet>>

The object as a property set, if it is one (the is CompositionPropertySet test of upstream).

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.