Skip to main content

framed_transform_padded

Function framed_transform_padded 

Source
fn framed_transform_padded(
    zoom: ZoomTransform,
    crop: CropRect,
    k_x: f64,
    k_y: f64,
) -> Transform
Expand description

framed_transform with a uniform padding inset folded in (ED.18).

Background framing lifts the screen off its backdrop by padding pixels. In NDC that’s a centred shrink by (k_x, k_y) about the origin, and since both the base fill and the zoom focal-pin are about the origin, the inset is exactly a post-multiply: scale *= k, position *= k. With k = (1, 1) it reduces to framed_transform.