Enum servo_geometry::DeviceIndependentPixel[][src]

pub enum DeviceIndependentPixel {}

A normalized “pixel” at the default resolution for the display.

Like the CSS “px” unit, the exact physical size of this unit may vary between devices, but it should approximate a device-independent reference length. This unit corresponds to Android’s “density-independent pixel” (dip), Mac OS X’s “point”, and Windows “device-independent pixel.”

The relationship between DevicePixel and DeviceIndependentPixel is defined by the OS. On most low-dpi screens, one DeviceIndependentPixel is equal to one DevicePixel. But on high-density screens it can be some larger number. For example, by default on Apple “retina” displays, one DeviceIndependentPixel equals two DevicePixels. On Android “MDPI” displays, one DeviceIndependentPixel equals 1.5 device pixels.

The ratio between DeviceIndependentPixel and DevicePixel for a given display be found by calling servo::windowing::WindowMethods::hidpi_factor.

Trait Implementations

impl Clone for DeviceIndependentPixel[src]

impl Copy for DeviceIndependentPixel[src]

impl Debug for DeviceIndependentPixel[src]

impl MallocSizeOf for DeviceIndependentPixel[src]

Auto Trait Implementations

impl RefUnwindSafe for DeviceIndependentPixel

impl Send for DeviceIndependentPixel

impl Sync for DeviceIndependentPixel

impl Unpin for DeviceIndependentPixel

impl UnwindSafe for DeviceIndependentPixel

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T> Same<T> for T[src]

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,