zng_layout::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<Factor2d> for PxSize

source§

type Output = Size2D<Px, Px>

The resulting type after applying the / operator.
source§

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

Performs the / operation. Read more
source§

impl DivAssign<Factor2d> for PxSize

source§

fn div_assign(&mut self, rhs: Factor2d)

Performs the /= operation. Read more
source§

impl IntoVar<PxConstraints2d> for PxSize

source§

fn into_var(self) -> Self::Var

New exact.

source§

type Var = LocalVar<PxConstraints2d>

Variable type that will wrap the T value. Read more
source§

fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>
where Self: Sized,

Converts into BoxedVar<T>. Read more
source§

impl IntoVar<Size> for PxSize

source§

type Var = LocalVar<Size>

Variable type that will wrap the T value. Read more
source§

fn into_var(self) -> Self::Var

Converts the source value into a var.
source§

fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>
where Self: Sized,

Converts into BoxedVar<T>. Read more
source§

impl Mul<Factor2d> for PxSize

source§

type Output = Size2D<Px, Px>

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl MulAssign<Factor2d> for PxSize

source§

fn mul_assign(&mut self, rhs: Factor2d)

Performs the *= operation. Read more
source§

impl IntoValue<PxConstraints2d> for PxSize

source§

impl IntoValue<Size> for PxSize