Type Alias zng_unit::DipVector

source ·
pub type DipVector = Vector2D<Dip, Dip>;
Expand description

A vector in device independent pixels.

Aliased Type§

struct DipVector {
    pub x: Dip,
    pub y: Dip,
}

Fields§

§x: Dip

The x (traditionally, horizontal) coordinate.

§y: Dip

The y (traditionally, vertical) coordinate.

Trait Implementations§

source§

impl DipToPx for DipVector

source§

type AsPx = Vector2D<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 DipVector

source§

type Output = Vector2D<Dip, Dip>

The resulting type after applying the / operator.
source§

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

Performs the / operation. Read more
source§

impl DivAssign<Factor> for DipVector

source§

fn div_assign(&mut self, rhs: Factor)

Performs the /= operation. Read more
source§

impl Mul<Factor> for DipVector

source§

type Output = Vector2D<Dip, Dip>

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl MulAssign<Factor> for DipVector

source§

fn mul_assign(&mut self, rhs: Factor)

Performs the *= operation. Read more