[][src]Enum servo_geometry::DeviceIndependentPixel

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
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

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

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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>, 
[src]