#[repr(C)]pub struct UPx(/* private fields */);
Expand description
Unsigned Physical pixels
Implementations§
source§impl UPx
impl UPx
sourcepub const fn saturating_sub(self, other: Self) -> Self
pub const fn saturating_sub(self, other: Self) -> Self
sourcepub const fn saturating_add(self, other: Self) -> Self
pub const fn saturating_add(self, other: Self) -> Self
sourcepub const fn saturating_mul(self, other: Self) -> Self
pub const fn saturating_mul(self, other: Self) -> Self
sourcepub const fn saturating_div(self, other: Self) -> Self
pub const fn saturating_div(self, other: Self) -> Self
Trait Implementations§
source§impl AddAssign<u32> for UPx
impl AddAssign<u32> for UPx
source§fn add_assign(&mut self, rhs: u32)
fn add_assign(&mut self, rhs: u32)
Performs the
+=
operation. Read moresource§impl AddAssign for UPx
impl AddAssign for UPx
source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+=
operation. Read moresource§impl DivAssign<u32> for UPx
impl DivAssign<u32> for UPx
source§fn div_assign(&mut self, rhs: u32)
fn div_assign(&mut self, rhs: u32)
Performs the
/=
operation. Read moresource§impl DivAssign for UPx
impl DivAssign for UPx
source§fn div_assign(&mut self, rhs: Self)
fn div_assign(&mut self, rhs: Self)
Performs the
/=
operation. Read moresource§impl FloatConversion for UPx
impl FloatConversion for UPx
source§impl IntoComponents<UPx> for f32
impl IntoComponents<UPx> for f32
source§fn into_components(self) -> (UPx, UPx)
fn into_components(self) -> (UPx, UPx)
Extracts this type’s 2d vector components.
source§fn to_vec<Type>(self) -> Typewhere
Type: FromComponents<Unit>,
fn to_vec<Type>(self) -> Typewhere
Type: FromComponents<Unit>,
Converts this type to another type using
FromComponents
and
IntoComponents
.source§impl IntoComponents<UPx> for u32
impl IntoComponents<UPx> for u32
source§fn into_components(self) -> (UPx, UPx)
fn into_components(self) -> (UPx, UPx)
Extracts this type’s 2d vector components.
source§fn to_vec<Type>(self) -> Typewhere
Type: FromComponents<Unit>,
fn to_vec<Type>(self) -> Typewhere
Type: FromComponents<Unit>,
Converts this type to another type using
FromComponents
and
IntoComponents
.source§impl IntoSigned for UPx
impl IntoSigned for UPx
source§impl IntoUnsigned for UPx
impl IntoUnsigned for UPx
source§impl MulAssign<u32> for UPx
impl MulAssign<u32> for UPx
source§fn mul_assign(&mut self, rhs: u32)
fn mul_assign(&mut self, rhs: u32)
Performs the
*=
operation. Read moresource§impl MulAssign for UPx
impl MulAssign for UPx
source§fn mul_assign(&mut self, rhs: Self)
fn mul_assign(&mut self, rhs: Self)
Performs the
*=
operation. Read moresource§impl Ord for UPx
impl Ord for UPx
source§impl PartialOrd<Px> for UPx
impl PartialOrd<Px> for UPx
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl PartialOrd<UPx> for Px
impl PartialOrd<UPx> for Px
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl PartialOrd<u32> for UPx
impl PartialOrd<u32> for UPx
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl PartialOrd for UPx
impl PartialOrd for UPx
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl PixelScaling for UPx
impl PixelScaling for UPx
source§const PX_SCALING_FACTOR: u16 = 1u16
const PX_SCALING_FACTOR: u16 = 1u16
The scaling factor to apply when converting to pixels, in addition to
any spatial scaling already being applied.
source§impl RemAssign<u32> for UPx
impl RemAssign<u32> for UPx
source§fn rem_assign(&mut self, rhs: u32)
fn rem_assign(&mut self, rhs: u32)
Performs the
%=
operation. Read moresource§impl RemAssign for UPx
impl RemAssign for UPx
source§fn rem_assign(&mut self, rhs: Self)
fn rem_assign(&mut self, rhs: Self)
Performs the
%=
operation. Read moresource§impl ScreenScale for UPx
impl ScreenScale for UPx
source§fn into_px(self, _scale: Fraction) -> Self::Px
fn into_px(self, _scale: Fraction) -> Self::Px
Converts this value from its current unit into device pixels (
Px
)
using the provided scale
factor.source§fn from_px(px: Self::Px, _scale: Fraction) -> Self
fn from_px(px: Self::Px, _scale: Fraction) -> Self
Converts from pixels into this type, using the provided
scale
factor.source§fn into_lp(self, scale: Fraction) -> Self::Lp
fn into_lp(self, scale: Fraction) -> Self::Lp
Converts this value from its current unit into device independent pixels
(
Lp
) using the provided scale
factor.source§fn from_lp(lp: Self::Lp, scale: Fraction) -> Self
fn from_lp(lp: Self::Lp, scale: Fraction) -> Self
Converts from Lp into this type, using the provided
scale
factor.source§impl SubAssign<u32> for UPx
impl SubAssign<u32> for UPx
source§fn sub_assign(&mut self, rhs: u32)
fn sub_assign(&mut self, rhs: u32)
Performs the
-=
operation. Read moresource§impl SubAssign for UPx
impl SubAssign for UPx
source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-=
operation. Read moresource§impl UnscaledUnit for UPx
impl UnscaledUnit for UPx
§type Representation = u32
type Representation = u32
The internal reprsentation used by this type.
source§fn from_unscaled(unscaled: Self::Representation) -> Self
fn from_unscaled(unscaled: Self::Representation) -> Self
Returns a new instance using the unscaled representation.
source§fn into_unscaled(self) -> Self::Representation
fn into_unscaled(self) -> Self::Representation
Returns the inner, unscaled representation of this value.
impl Copy for UPx
impl Eq for UPx
impl StructuralPartialEq for UPx
Auto Trait Implementations§
impl Freeze for UPx
impl RefUnwindSafe for UPx
impl Send for UPx
impl Sync for UPx
impl Unpin for UPx
impl UnwindSafe for UPx
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<Unit> IntoComponents<Unit> for Unitwhere
Unit: Copy,
impl<Unit> IntoComponents<Unit> for Unitwhere
Unit: Copy,
source§fn into_components(self) -> (Unit, Unit)
fn into_components(self) -> (Unit, Unit)
Extracts this type’s 2d vector components.
source§fn to_vec<Type>(self) -> Typewhere
Type: FromComponents<Unit>,
fn to_vec<Type>(self) -> Typewhere
Type: FromComponents<Unit>,
Converts this type to another type using
FromComponents
and
IntoComponents
.