Struct rusttype::Scale [] [src]

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

Defines the size of a rendered face of a font, in pixels, horizontally and vertically. A vertical scale of y pixels means that the distance betwen the ascent and descent lines (see VMetrics) of the face will be y pixels. If x and y are equal the scaling is uniform. Non-uniform scaling by a factor f in the horizontal direction is achieved by setting x equal to f times y.

Fields

x

Horizontal scale, in pixels.

y

Vertical scale, in pixels.

Methods

impl Scale

fn uniform(s: f32) -> Scale

Uniform scaling, equivalent to Scale { x: s, y: s }.

Trait Implementations

Derived Implementations

impl Debug for Scale

fn fmt(&self, __arg_0: &mut Formatter) -> Result

impl PartialOrd for Scale

fn partial_cmp(&self, __arg_0: &Scale) -> Option<Ordering>

fn lt(&self, __arg_0: &Scale) -> bool

fn le(&self, __arg_0: &Scale) -> bool

fn gt(&self, __arg_0: &Scale) -> bool

fn ge(&self, __arg_0: &Scale) -> bool

impl PartialEq for Scale

fn eq(&self, __arg_0: &Scale) -> bool

fn ne(&self, __arg_0: &Scale) -> bool

impl Clone for Scale

fn clone(&self) -> Scale

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

impl Copy for Scale