Struct swash::Variation[][src]

pub struct Variation<'a> { /* fields omitted */ }

Axis of variation in a variable font.

Implementations

impl<'a> Variation<'a>[src]

pub fn index(&self) -> usize[src]

Returns the index of the variation.

pub fn tag(&self) -> Tag[src]

Returns the tag that identifies the variation.

pub fn name_id(&self) -> StringId[src]

Returns the name identifier for the variation.

pub fn name(&self, language: Option<&str>) -> Option<LocalizedString<'a>>[src]

Returns the name for the variation, optionally for a particular language.

pub fn is_hidden(&self) -> bool[src]

Returns true if the variation should be hidden from users.

pub fn min_value(&self) -> f32[src]

Returns the minimum value of the variation.

pub fn max_value(&self) -> f32[src]

Returns the maximum value of the variation.

pub fn default_value(&self) -> f32[src]

Returns the default value of the variation.

pub fn normalize(&self, value: f32) -> NormalizedCoord[src]

Computes a normalized coordinate for the specified value.

Trait Implementations

impl<'a> Clone for Variation<'a>[src]

impl<'a> Copy for Variation<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for Variation<'a>

impl<'a> Send for Variation<'a>

impl<'a> Sync for Variation<'a>

impl<'a> Unpin for Variation<'a>

impl<'a> UnwindSafe for Variation<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.