Skip to main content

RectAnimationUsingKeyFrames

Struct RectAnimationUsingKeyFrames 

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

Animates a Rect property through discrete / linear / eased / splined key frames.

Implementations§

Source§

impl RectAnimationUsingKeyFrames

Source

pub fn raw(&self) -> *mut c_void

Raw Noesis::BaseComponent*. Borrowed for the lifetime of self.

Source§

impl RectAnimationUsingKeyFrames

Source

pub fn new() -> Self

Create an empty key-frame rect animation.

§Panics

Panics if Noesis fails to allocate.

Source

pub fn add_key_frame( &mut self, kind: KeyFrameKind, key_time_secs: f64, value: [f32; 4], interp: KeyFrameInterp<'_>, ) -> bool

Append a key frame reaching value ([x, y, width, height]) at key_time_secs. Provide the matching KeyFrameInterp for KeyFrameKind::Easing / KeyFrameKind::Spline.

Source

pub fn key_frame_count(&self) -> Option<u32>

Number of key frames.

Source

pub fn key_frame_value(&self, index: u32) -> Option<[f32; 4]>

Read back the key frame value at index, or None if out of range.

Source

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 RectAnimationUsingKeyFrames

Source§

fn animation_raw(&self) -> *mut c_void

Borrowed Noesis::AnimationTimeline* for self.
Source§

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 more
Source§

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 more
Source§

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

Start this animation directly on target’s dp_name dependency property, using the target’s view TimeManager (a BeginAnimation / ApplyAnimationClock equivalent). target must be connected to a live View (so it has a TimeManager). Returns false on an unknown property or a disconnected target. Read more
Source§

impl AsComponent for RectAnimationUsingKeyFrames

Source§

fn component_raw(&self) -> *mut c_void

Borrowed Noesis::BaseComponent* for self.
Source§

impl Default for RectAnimationUsingKeyFrames

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Drop for RectAnimationUsingKeyFrames

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more
Source§

impl Send for RectAnimationUsingKeyFrames

Source§

impl Timeline for RectAnimationUsingKeyFrames

Source§

fn timeline_raw(&self) -> *mut c_void

Borrowed Noesis::Timeline* for self.
Source§

fn set_duration_secs(&mut self, seconds: f64) -> bool

Set the single-pass duration in seconds.
Source§

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

Set Duration="Forever".
Source§

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

Delay before the timeline begins, in seconds.
Source§

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

Rate at which time progresses relative to the parent (default 1.0).
Source§

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

Repeat a fixed number of (possibly fractional) iterations.
Source§

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

Repeat forever.

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> 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 = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.