Type Alias zng_unit::PxSize

source ·
pub type PxSize = Size2D<Px, Px>;
Expand description

A size in device pixels.

Aliased Type§

struct PxSize {
    pub width: Px,
    pub height: Px,
    /* private fields */
}

Fields§

§width: Px

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

§height: Px

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

Trait Implementations§

source§

impl Div<Factor> for PxSize

§

type Output = Size2D<Px, Px>

The resulting type after applying the / operator.
source§

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

Performs the / operation. Read more
source§

impl DivAssign<Factor> for PxSize

source§

fn div_assign(&mut self, rhs: Factor)

Performs the /= operation. Read more
source§

impl Mul<Factor> for PxSize

§

type Output = Size2D<Px, Px>

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl MulAssign<Factor> for PxSize

source§

fn mul_assign(&mut self, rhs: Factor)

Performs the *= operation. Read more
source§

impl PxToDip for PxSize

§

type AsDip = Size2D<Dip, Dip>

Self equivalent in Dip units.
source§

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

Divide the Px self by the scale.