Trait zng::layout::ResolutionUnits

source ·
pub trait ResolutionUnits {
    // Required methods
    fn ppi(self) -> Ppi;
    fn ppm(self) -> Ppm;

    // Provided method
    fn dpi(self) -> Ppi
       where Self: Sized { ... }
}
Expand description

Extension methods for initializing resolution units.

§Examples

use zng_layout::unit::*;

let ppm: Ppm = 96.dpi().into();

Required Methods§

source

fn ppi(self) -> Ppi

Pixels-per-inch.

source

fn ppm(self) -> Ppm

Pixels-per-meter.

Provided Methods§

source

fn dpi(self) -> Ppi
where Self: Sized,

Same as ppi.

Implementations on Foreign Types§

source§

impl ResolutionUnits for f32

source§

fn ppi(self) -> Ppi

source§

fn ppm(self) -> Ppm

source§

impl ResolutionUnits for u32

source§

fn ppi(self) -> Ppi

source§

fn ppm(self) -> Ppm

Implementors§