Skip to main content

backdrop_matrix_sampling

Function backdrop_matrix_sampling 

Source
pub fn backdrop_matrix_sampling(
    stage: Transform,
    matrix: Transform,
    scale: f32,
) -> Option<Transform>
Expand description

ImageFilter.matrix applied to a backdrop, in device pixels: the map from an output pixel position to the backdrop position it shows.

The matrix moves the backdrop in the stage’s coordinates: content at a point p of the stage moves to matrix · p. stage maps the stage’s coordinates to the target’s logical coordinates and scale logical to device pixels, so an output pixel d shows the backdrop at S · W · M⁻¹ · W⁻¹ · S⁻¹ · d. None when the matrix or the stage transform cannot be inverted, which leaves nothing to sample.