Trait zng::layout::DipToPx

source ·
pub trait DipToPx {
    type AsPx;

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

Conversion from Dip to Px units.

Required Associated Types§

source

type AsPx

Self equivalent in Px units.

Required Methods§

source

fn to_px(self, scale_factor: Factor) -> Self::AsPx

Multiply the Dip self by the scale.

Implementations on Foreign Types§

source§

impl DipToPx for Box2D<Dip, Dip>

source§

type AsPx = Box2D<Px, Px>

source§

fn to_px(self, scale_factor: Factor) -> <Box2D<Dip, Dip> as DipToPx>::AsPx

source§

impl DipToPx for Point2D<f32, Dip>

source§

type AsPx = Point2D<f32, Px>

source§

fn to_px(self, scale_factor: Factor) -> <Point2D<f32, Dip> as DipToPx>::AsPx

source§

impl DipToPx for Point2D<Dip, Dip>

source§

type AsPx = Point2D<Px, Px>

source§

fn to_px(self, scale_factor: Factor) -> <Point2D<Dip, Dip> as DipToPx>::AsPx

source§

impl DipToPx for Rect<Dip, Dip>

source§

type AsPx = Rect<Px, Px>

source§

fn to_px(self, scale_factor: Factor) -> <Rect<Dip, Dip> as DipToPx>::AsPx

source§

impl DipToPx for Size2D<Dip, Dip>

source§

type AsPx = Size2D<Px, Px>

source§

fn to_px(self, scale_factor: Factor) -> <Size2D<Dip, Dip> as DipToPx>::AsPx

source§

impl DipToPx for Vector2D<Dip, Dip>

source§

type AsPx = Vector2D<Px, Px>

source§

fn to_px(self, scale_factor: Factor) -> <Vector2D<Dip, Dip> as DipToPx>::AsPx

Implementors§