zng_unit

Type Alias 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,
}

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

source§

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

source§

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

source§

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.