Function webrender::spatial_node::snap_offset
source ยท fn snap_offset<OffsetUnits, ScaleUnits>(
offset: Vector2D<f32, OffsetUnits>,
scale: Vector2D<f32, ScaleUnits>,
) -> Vector2D<f32, OffsetUnits>
Expand description
Snap an offset to be incorporated into a transform, where the local space may be considered the world space. We assume raster scale is 1.0, which may not always be correct if there are intermediate surfaces used, however those are either cases where snapping is not important (e.g. has perspective or is not axis aligned), or an edge case (e.g. SVG filters) which we can accept imperfection for now.