Skip to main content

TextAnimatorProperties

Struct TextAnimatorProperties 

Source
pub struct TextAnimatorProperties {
    pub offset: Option<Animated<Vec2>>,
    pub scale: Option<Animated<Vec2>>,
    pub rotation_degrees: Option<Animated<f32>>,
    pub opacity: Option<Animated<f32>>,
    pub fill: Option<Animated<Rgba>>,
    pub stroke: Option<Animated<Rgba>>,
    pub tracking: Option<Animated<f32>>,
}
Expand description

What an animator does to each character, in proportion to its selection. A property left out does nothing.

Fields§

§offset: Option<Animated<Vec2>>

Moves the character, in font sizes, +y down.

§scale: Option<Animated<Vec2>>

Scales the character about its centre; 1 is none. Each axis in [0, 10].

§rotation_degrees: Option<Animated<f32>>

Turns the character about its centre, clockwise degrees.

§opacity: Option<Animated<f32>>

The opacity a fully selected character takes, in [0, 1].

§fill: Option<Animated<Rgba>>

The fill color a fully selected character takes; a gradient fill is mixed toward it.

§stroke: Option<Animated<Rgba>>

The color every stroke of a fully selected character takes.

§tracking: Option<Animated<f32>>

Space added after the character, in font sizes, in [-0.5, 1], as letter spacing adds it. Lines are not re-broken.

Implementations§

Source§

impl TextAnimatorProperties

Source

pub const fn is_empty(&self) -> bool

Whether no property is set: the animator does nothing.

Trait Implementations§

Source§

impl Clone for TextAnimatorProperties

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TextAnimatorProperties

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for TextAnimatorProperties

Source§

fn default() -> Self

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

impl<'de> Deserialize<'de> for TextAnimatorProperties

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for TextAnimatorProperties

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for TextAnimatorProperties

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for TextAnimatorProperties

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.