Trait zng::layout::PxToDip

source ·
pub trait PxToDip {
    type AsDip;

    // Required method
    fn to_dip(self, scale_factor: Factor) -> Self::AsDip;
}
Expand description

Conversion from Px to Dip units.

Required Associated Types§

source

type AsDip

Self equivalent in Dip units.

Required Methods§

source

fn to_dip(self, scale_factor: Factor) -> Self::AsDip

Divide the Px self by the scale.

Implementations on Foreign Types§

source§

impl PxToDip for Box2D<Px, Px>

source§

type AsDip = Box2D<Dip, Dip>

source§

fn to_dip(self, scale_factor: Factor) -> <Box2D<Px, Px> as PxToDip>::AsDip

source§

impl PxToDip for Point2D<Px, Px>

source§

type AsDip = Point2D<Dip, Dip>

source§

fn to_dip(self, scale_factor: Factor) -> <Point2D<Px, Px> as PxToDip>::AsDip

source§

impl PxToDip for Rect<Px, Px>

source§

type AsDip = Rect<Dip, Dip>

source§

fn to_dip(self, scale_factor: Factor) -> <Rect<Px, Px> as PxToDip>::AsDip

source§

impl PxToDip for Size2D<Px, Px>

source§

type AsDip = Size2D<Dip, Dip>

source§

fn to_dip(self, scale_factor: Factor) -> <Size2D<Px, Px> as PxToDip>::AsDip

source§

impl PxToDip for Vector2D<Px, Px>

source§

type AsDip = Vector2D<Dip, Dip>

source§

fn to_dip(self, scale_factor: Factor) -> <Vector2D<Px, Px> as PxToDip>::AsDip

Implementors§