Struct solstice_glyph::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

impl Copy for PxScale

impl Debug for PxScale

impl From<f32> for PxScale

pub fn from(s: f32) -> PxScale

Uniform scaling where x & y are the same.

impl PartialEq<PxScale> for PxScale

impl PartialOrd<PxScale> for PxScale

impl StructuralPartialEq for PxScale

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> Pointable for T

type Init = T

The type for initializers.

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,