pub struct ColorKeyFrameAnimation { /* private fields */ }Expand description
A key frame animation of $crate :: media :: Color values.
Implementations§
Source§impl ColorKeyFrameAnimation
impl ColorKeyFrameAnimation
pub fn new(compositor: &Rc<Compositor>) -> Rc<ColorKeyFrameAnimation>
pub fn insert_key_frame_with_easing( &self, normalized_progress_key: f32, value: Color, easing_function: Rc<dyn IEasing>, )
pub fn insert_key_frame(&self, normalized_progress_key: f32, value: Color)
Methods from Deref<Target = KeyFrameAnimation>§
Sourcepub fn delay_behavior(&self) -> AnimationDelayBehavior
pub fn delay_behavior(&self) -> AnimationDelayBehavior
The delay behavior of the key frame animation.
pub fn set_delay_behavior(&self, value: AnimationDelayBehavior)
Sourcepub fn delay_time(&self) -> Duration
pub fn delay_time(&self) -> Duration
Delay before the animation starts after start_animation is called.
pub fn set_delay_time(&self, value: Duration)
Sourcepub fn direction(&self) -> PlaybackDirection
pub fn direction(&self) -> PlaybackDirection
The direction the animation is playing.
The Direction property allows you to drive your animation from start to end or end to start or alternate
between start and end or end to start if animation has an iteration_count greater than one.
This gives an easy way for customizing animation definitions.
pub fn set_direction(&self, value: PlaybackDirection)
Sourcepub fn duration(&self) -> Duration
pub fn duration(&self) -> Duration
The duration of the animation. Minimum allowed value is 1ms and maximum allowed value is 24 days.
Sourcepub fn set_duration(&self, value: Duration)
pub fn set_duration(&self, value: Duration)
Sets the duration. As upstream, the range check is made on the current value rather than on the new one.
Sourcepub fn iteration_behavior(&self) -> AnimationIterationBehavior
pub fn iteration_behavior(&self) -> AnimationIterationBehavior
The iteration behavior for the key frame animation.
pub fn set_iteration_behavior(&self, value: AnimationIterationBehavior)
Sourcepub fn iteration_count(&self) -> i32
pub fn iteration_count(&self) -> i32
The number of times to repeat the key frame animation.
pub fn set_iteration_count(&self, value: i32)
Sourcepub fn stop_behavior(&self) -> AnimationStopBehavior
pub fn stop_behavior(&self) -> AnimationStopBehavior
Specifies how to set the property value when animation is stopped
pub fn set_stop_behavior(&self, value: AnimationStopBehavior)
Sourcepub fn insert_expression_key_frame(
&self,
normalized_progress_key: f32,
value: &str,
easing_function: Option<Easing>,
)
pub fn insert_expression_key_frame( &self, normalized_progress_key: f32, value: &str, easing_function: Option<Easing>, )
Inserts an expression keyframe.
normalized_progress_key is the time the key frame should occur at,
expressed as a percentage of the animation Duration. Allowed value
is from 0.0 to 1.0. value is the expression used to calculate the
value of the key frame. easing_function is the easing function to
use when interpolating between frames; the default easing of the
compositor when None.
Methods from Deref<Target = CompositionAnimation>§
Sourcepub fn object(&self) -> &CompositionObject
pub fn object(&self) -> &CompositionObject
The embedded CompositionObject.
Sourcepub fn compositor(&self) -> &Rc<Compositor>
pub fn compositor(&self) -> &Rc<Compositor>
The associated compositor.
Sourcepub fn clear_all_parameters(&self)
pub fn clear_all_parameters(&self)
Clears all of the parameters of the animation.
Sourcepub fn clear_parameter(&self, key: &str)
pub fn clear_parameter(&self, key: &str)
Clears a parameter from the animation.
pub fn set_color_parameter(&self, key: &str, value: Color)
pub fn set_matrix3x2_parameter(&self, key: &str, value: Matrix3x2)
pub fn set_matrix4x4_parameter(&self, key: &str, value: Matrix4x4)
pub fn set_quaternion_parameter(&self, key: &str, value: Quaternion)
pub fn set_reference_parameter( &self, key: &str, composition_object: Rc<dyn AsCompositionObject>, )
pub fn set_scalar_parameter(&self, key: &str, value: f32)
pub fn set_vector2_parameter(&self, key: &str, value: Vector2)
pub fn set_vector3_parameter(&self, key: &str, value: Vector3)
pub fn set_vector4_parameter(&self, key: &str, value: Vector4)
pub fn set_target(&self, value: Option<String>)
Trait Implementations§
Source§impl AsCompositionObject for ColorKeyFrameAnimation
impl AsCompositionObject for ColorKeyFrameAnimation
Source§fn as_composition_object(&self) -> &CompositionObject
fn as_composition_object(&self) -> &CompositionObject
CompositionObject.Source§fn composition_type_name(&self) -> &'static str
fn composition_type_name(&self) -> &'static str
Source§fn as_property_set(self: Rc<Self>) -> Option<Rc<CompositionPropertySet>>
fn as_property_set(self: Rc<Self>) -> Option<Rc<CompositionPropertySet>>
is CompositionPropertySet test of upstream).Source§impl Deref for ColorKeyFrameAnimation
impl Deref for ColorKeyFrameAnimation
Source§type Target = KeyFrameAnimation
type Target = KeyFrameAnimation
Source§fn deref(&self) -> &KeyFrameAnimation
fn deref(&self) -> &KeyFrameAnimation
Source§impl ICompositionAnimation for ColorKeyFrameAnimation
impl ICompositionAnimation for ColorKeyFrameAnimation
Source§fn create_instance(
&self,
target_object: ServerObjectId,
final_value: Option<ExpressionVariant>,
) -> AnimationInstanceFactory
fn create_instance( &self, target_object: ServerObjectId, final_value: Option<ExpressionVariant>, ) -> AnimationInstanceFactory
target_object, as the factory that is sent to the server. final_value is the value the property was just
set to when the animation is implicit.Source§impl ICompositionAnimationBase for ColorKeyFrameAnimation
impl ICompositionAnimationBase for ColorKeyFrameAnimation
Source§fn as_composition_animation(&self) -> Option<&dyn ICompositionAnimation>
fn as_composition_animation(&self) -> Option<&dyn ICompositionAnimation>
Source§fn as_composition_animation_group(&self) -> Option<&CompositionAnimationGroup>
fn as_composition_animation_group(&self) -> Option<&CompositionAnimationGroup>
Auto Trait Implementations§
impl !Freeze for ColorKeyFrameAnimation
impl !RefUnwindSafe for ColorKeyFrameAnimation
impl !Send for ColorKeyFrameAnimation
impl !Sync for ColorKeyFrameAnimation
impl !UnwindSafe for ColorKeyFrameAnimation
impl Unpin for ColorKeyFrameAnimation
impl UnsafeUnpin for ColorKeyFrameAnimation
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
affects_render, metadata
overrides). Read more