zng::layout

Trait 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§