zng_unit

Type Alias PxVector

source
pub type PxVector = Vector2D<Px, Px>;
Expand description

A vector in device pixels.

Aliased Type§

struct PxVector {
    pub x: Px,
    pub y: Px,
}

Fields§

§x: Px

The x (traditionally, horizontal) coordinate.

§y: Px

The y (traditionally, vertical) coordinate.

Trait Implementations§

source§

impl Div<Factor> for PxVector

source§

type Output = Vector2D<Px, Px>

The resulting type after applying the / operator.
source§

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

Performs the / operation. Read more
source§

impl DivAssign<Factor> for PxVector

source§

fn div_assign(&mut self, rhs: Factor)

Performs the /= operation. Read more
source§

impl Mul<Factor> for PxVector

source§

type Output = Vector2D<Px, Px>

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl MulAssign<Factor> for PxVector

source§

fn mul_assign(&mut self, rhs: Factor)

Performs the *= operation. Read more
source§

impl PxToDip for PxVector

source§

type AsDip = Vector2D<Dip, Dip>

Self equivalent in Dip units.
source§

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

Divide the Px self by the scale.