[−][src]Module azul_webrender_api::units
A collection of coordinate spaces and their corresponding Point, Size and Rect types.
Physical pixels take into account the device pixel ratio and their dimensions tend to correspond to the allocated size of resources in memory, while logical pixels don't have the device pixel ratio applied which means they are agnostic to the usage of hidpi screens and the like.
The terms "layer" and "stacking context" can be used interchangeably in the context of coordinate systems.
Structs
Au | An App Unit, the fundamental unit of length in Servo. Usually
1/60th of a pixel (see |
DevicePixel | Geometry in the coordinate system of the render target (screen or intermediate surface) in physical pixels. |
FramebufferPixel | Geometry in the coordinate system of the framebuffer in physical pixels. It's Y-flipped comparing to DevicePixel. |
LayoutPixel | Geometry in a stacking context's local coordinate space (logical pixels). |
PicturePixel | Geometry in the coordinate system of a Picture (intermediate surface) in physical pixels. |
RasterPixel | Geometry gets rasterized in a given root coordinate space. This is often the root spatial node (world space), but may be a local space for a variety of reasons (e.g. perspective). |
TexelRect | Stores two coordinates in texel space. The coordinates are stored in texel coordinates because the texture atlas may grow. Storing them as texel coords and normalizing the UVs in the vertex shader means nothing needs to be updated on the CPU when the texture size changes. |
Tiles | Offset in number of tiles. |
WorldPixel | Geometry in the document's coordinate space (logical pixels). |
Traits
AuHelpers | |
RectExt |
Functions
device_rect_as_framebuffer_rect | |
device_size_as_framebuffer_size | |
layout_rect_as_picture_rect | |
layout_vector_as_picture_vector |