Type Alias zng_unit::DipSize

source ·
pub type DipSize = Size2D<Dip, Dip>;
Expand description

A size in device pixels.

Aliased Type§

struct DipSize {
    pub width: Dip,
    pub height: Dip,
}

Fields§

§width: Dip

The extent of the element in the U units along the x axis (usually horizontal).

§height: Dip

The extent of the element in the U units along the y axis (usually vertical).

Trait Implementations§

source§

impl DipToPx for DipSize

source§

type AsPx = Size2D<Px, Px>

Self equivalent in Px units.
source§

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

Multiply the Dip self by the scale.
source§

impl Div<Factor> for DipSize

source§

type Output = Size2D<Dip, Dip>

The resulting type after applying the / operator.
source§

fn div(self, rhs: Factor) -> DipSize

Performs the / operation. Read more
source§

impl DivAssign<Factor> for DipSize

source§

fn div_assign(&mut self, rhs: Factor)

Performs the /= operation. Read more
source§

impl Mul<Factor> for DipSize

source§

type Output = Size2D<Dip, Dip>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Factor) -> DipSize

Performs the * operation. Read more
source§

impl MulAssign<Factor> for DipSize

source§

fn mul_assign(&mut self, rhs: Factor)

Performs the *= operation. Read more