[][src]Struct ab_glyph::PxScale

pub struct PxScale {
    pub x: f32,
    pub y: f32,
}

Pixel scale.

This is the pixel-height of text.

Usually one uses x == y, but one may use a different ratio to stretch a font horizontally or vertically.

Example

use ab_glyph::PxScale;

let uniform_scale_24px = PxScale::from(24.0);

Fields

x: f32

Horizontal scale in pixels.

y: f32

Vertical scale in pixels.

By definition, this is the pixel-height of a font.

Trait Implementations

impl Clone for PxScale[src]

impl Copy for PxScale[src]

impl Debug for PxScale[src]

impl From<f32> for PxScale[src]

fn from(s: f32) -> Self[src]

Uniform scaling where x & y are the same.

impl PartialEq<PxScale> for PxScale[src]

impl PartialOrd<PxScale> for PxScale[src]

impl StructuralPartialEq for PxScale[src]

Auto Trait Implementations

impl RefUnwindSafe for PxScale

impl Send for PxScale

impl Sync for PxScale

impl Unpin for PxScale

impl UnwindSafe for PxScale

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.