#[non_exhaustive]pub struct AnimationFade {
pub fade_type: FadeType,
pub xy: Option<NormalizedCoordinate>,
pub start_time_offset: Option<Duration>,
pub end_time_offset: Option<Duration>,
/* private fields */
}Expand description
Display overlay object with fade animation.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.fade_type: FadeTypeRequired. Type of fade animation: FADE_IN or FADE_OUT.
xy: Option<NormalizedCoordinate>Normalized coordinates based on output video resolution. Valid
values: 0.0–1.0. xy is the upper-left coordinate of the overlay
object. For example, use the x and y coordinates {0,0} to position the
top-left corner of the overlay animation in the top-left corner of the
output video.
start_time_offset: Option<Duration>The time to start the fade animation, in seconds. Default: 0
end_time_offset: Option<Duration>The time to end the fade animation, in seconds. Default:
start_time_offset + 1s
Implementations§
Source§impl AnimationFade
impl AnimationFade
pub fn new() -> Self
Sourcepub fn set_fade_type<T: Into<FadeType>>(self, v: T) -> Self
pub fn set_fade_type<T: Into<FadeType>>(self, v: T) -> Self
Sourcepub fn set_xy<T>(self, v: T) -> Selfwhere
T: Into<NormalizedCoordinate>,
pub fn set_xy<T>(self, v: T) -> Selfwhere
T: Into<NormalizedCoordinate>,
Sourcepub fn set_or_clear_xy<T>(self, v: Option<T>) -> Selfwhere
T: Into<NormalizedCoordinate>,
pub fn set_or_clear_xy<T>(self, v: Option<T>) -> Selfwhere
T: Into<NormalizedCoordinate>,
Sourcepub fn set_start_time_offset<T>(self, v: T) -> Self
pub fn set_start_time_offset<T>(self, v: T) -> Self
Sets the value of start_time_offset.
§Example
ⓘ
use wkt::Duration;
let x = AnimationFade::new().set_start_time_offset(Duration::default()/* use setters */);Sourcepub fn set_or_clear_start_time_offset<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_start_time_offset<T>(self, v: Option<T>) -> Self
Sets or clears the value of start_time_offset.
§Example
ⓘ
use wkt::Duration;
let x = AnimationFade::new().set_or_clear_start_time_offset(Some(Duration::default()/* use setters */));
let x = AnimationFade::new().set_or_clear_start_time_offset(None::<Duration>);Sourcepub fn set_end_time_offset<T>(self, v: T) -> Self
pub fn set_end_time_offset<T>(self, v: T) -> Self
Sets the value of end_time_offset.
§Example
ⓘ
use wkt::Duration;
let x = AnimationFade::new().set_end_time_offset(Duration::default()/* use setters */);Sourcepub fn set_or_clear_end_time_offset<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_end_time_offset<T>(self, v: Option<T>) -> Self
Sets or clears the value of end_time_offset.
§Example
ⓘ
use wkt::Duration;
let x = AnimationFade::new().set_or_clear_end_time_offset(Some(Duration::default()/* use setters */));
let x = AnimationFade::new().set_or_clear_end_time_offset(None::<Duration>);Trait Implementations§
Source§impl Clone for AnimationFade
impl Clone for AnimationFade
Source§fn clone(&self) -> AnimationFade
fn clone(&self) -> AnimationFade
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AnimationFade
impl Debug for AnimationFade
Source§impl Default for AnimationFade
impl Default for AnimationFade
Source§fn default() -> AnimationFade
fn default() -> AnimationFade
Returns the “default value” for a type. Read more
Source§impl Message for AnimationFade
impl Message for AnimationFade
Source§impl PartialEq for AnimationFade
impl PartialEq for AnimationFade
impl StructuralPartialEq for AnimationFade
Auto Trait Implementations§
impl Freeze for AnimationFade
impl RefUnwindSafe for AnimationFade
impl Send for AnimationFade
impl Sync for AnimationFade
impl Unpin for AnimationFade
impl UnwindSafe for AnimationFade
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