pub struct ObjectAnimationUsingKeyFrames { /* private fields */ }Expand description
Animates an Object (arbitrary BaseComponent) property through discrete
key frames. Objects can’t be interpolated, so only discrete frames exist.
Implementations§
Source§impl ObjectAnimationUsingKeyFrames
impl ObjectAnimationUsingKeyFrames
Sourcepub fn add_key_frame<C: AsComponent>(
&mut self,
key_time_secs: f64,
value: &C,
) -> bool
pub fn add_key_frame<C: AsComponent>( &mut self, key_time_secs: f64, value: &C, ) -> bool
Append a discrete key frame setting value at key_time_secs. The
collection takes its own reference to value’s component, so the handle
may be dropped afterwards. value is any owning handle in this module
(its borrowed BaseComponent* is read).
Sourcepub fn key_frame_count(&self) -> Option<u32>
pub fn key_frame_count(&self) -> Option<u32>
Number of key frames.
Sourcepub fn key_frame_value(&self, index: u32) -> Option<OwnedComponent>
pub fn key_frame_value(&self, index: u32) -> Option<OwnedComponent>
Read back the component at key frame index as an owned handle (+1
reference), or None if out of range or the value is null.
Sourcepub fn key_frame_time(&self, index: u32) -> Option<f64>
pub fn key_frame_time(&self, index: u32) -> Option<f64>
Read back the key time (seconds) at index, or None if out of range.
Trait Implementations§
Source§impl Animation for ObjectAnimationUsingKeyFrames
impl Animation for ObjectAnimationUsingKeyFrames
Source§fn animation_raw(&self) -> *mut c_void
fn animation_raw(&self) -> *mut c_void
Borrowed
Noesis::AnimationTimeline* for self.Source§fn set_target_name(&mut self, name: &str) -> bool
fn set_target_name(&mut self, name: &str) -> bool
Set this animation’s
Storyboard.TargetName: the x:Name of the
element it drives, resolved against the namescope passed to
Storyboard::begin. Read moreSource§fn set_target_property(&mut self, path: &str) -> bool
fn set_target_property(&mut self, path: &str) -> bool
Set this animation’s
Storyboard.TargetProperty: the property path it
drives (e.g. "Opacity",
"(UIElement.RenderTransform).(ScaleTransform.ScaleX)"). Read moreSource§fn set_easing(&mut self, easing: &EasingFunction) -> bool
fn set_easing(&mut self, easing: &EasingFunction) -> bool
Attach an easing function. No-op (returns
false) for key-frame
animations, whose easing is configured per key frame instead.Source§fn begin_on(
&mut self,
target: &FrameworkElement,
dp_name: &str,
handoff: HandoffBehavior,
) -> bool
fn begin_on( &mut self, target: &FrameworkElement, dp_name: &str, handoff: HandoffBehavior, ) -> bool
Source§impl AsComponent for ObjectAnimationUsingKeyFrames
impl AsComponent for ObjectAnimationUsingKeyFrames
Source§fn component_raw(&self) -> *mut c_void
fn component_raw(&self) -> *mut c_void
Borrowed
Noesis::BaseComponent* for self.Source§impl Drop for ObjectAnimationUsingKeyFrames
impl Drop for ObjectAnimationUsingKeyFrames
impl Send for ObjectAnimationUsingKeyFrames
Source§impl Timeline for ObjectAnimationUsingKeyFrames
impl Timeline for ObjectAnimationUsingKeyFrames
Source§fn timeline_raw(&self) -> *mut c_void
fn timeline_raw(&self) -> *mut c_void
Borrowed
Noesis::Timeline* for self.Source§fn set_duration_secs(&mut self, seconds: f64) -> bool
fn set_duration_secs(&mut self, seconds: f64) -> bool
Set the single-pass duration in seconds.
Source§fn set_duration_auto(&mut self) -> bool
fn set_duration_auto(&mut self) -> bool
Set
Duration="Automatic" (resolved from the content, e.g. key frames).Source§fn set_duration_forever(&mut self) -> bool
fn set_duration_forever(&mut self) -> bool
Set
Duration="Forever".Source§fn duration_secs(&self) -> Option<f64>
fn duration_secs(&self) -> Option<f64>
Read the configured single-pass duration in seconds, or
None if the
duration is Automatic / Forever (not a resolved TimeSpan).Source§fn set_begin_time_secs(&mut self, seconds: f64) -> bool
fn set_begin_time_secs(&mut self, seconds: f64) -> bool
Delay before the timeline begins, in seconds.
Source§fn set_auto_reverse(&mut self, value: bool) -> bool
fn set_auto_reverse(&mut self, value: bool) -> bool
Play forwards then backwards each iteration when
true.Source§fn set_speed_ratio(&mut self, value: f32) -> bool
fn set_speed_ratio(&mut self, value: f32) -> bool
Rate at which time progresses relative to the parent (default
1.0).Source§fn set_fill_behavior(&mut self, behavior: FillBehavior) -> bool
fn set_fill_behavior(&mut self, behavior: FillBehavior) -> bool
Behaviour once the active period ends (hold the end value or release it).
Source§fn set_repeat_count(&mut self, count: f32) -> bool
fn set_repeat_count(&mut self, count: f32) -> bool
Repeat a fixed number of (possibly fractional) iterations.
Source§fn set_repeat_duration_secs(&mut self, seconds: f64) -> bool
fn set_repeat_duration_secs(&mut self, seconds: f64) -> bool
Repeat for a fixed wall-clock duration, in seconds.
Source§fn set_repeat_forever(&mut self) -> bool
fn set_repeat_forever(&mut self) -> bool
Repeat forever.
Auto Trait Implementations§
impl !Sync for ObjectAnimationUsingKeyFrames
impl Freeze for ObjectAnimationUsingKeyFrames
impl RefUnwindSafe for ObjectAnimationUsingKeyFrames
impl Unpin for ObjectAnimationUsingKeyFrames
impl UnsafeUnpin for ObjectAnimationUsingKeyFrames
impl UnwindSafe for ObjectAnimationUsingKeyFrames
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
Mutably borrows from an owned value. Read more