🐛 Override default SamplingOptions for ImageFill and set FilterMode (#5961)

* 🐛 Override default SamplingOptions for ImageFill and set FilterMode and MipmapMode to 'Linear' instead of 'Nearest'

* 📎 Use sampling_options from render_state in ImageFill
This commit is contained in:
Elena Torró 2025-02-26 14:27:25 +01:00 committed by GitHub
parent 0eaa43f36b
commit 27d15763f8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -85,7 +85,13 @@ fn draw_image_fill_in_container(
// Draw the image with the calculated destination rectangle
if let Some(image) = image {
canvas.draw_image_rect(image, None, dest_rect, &paint);
canvas.draw_image_rect_with_sampling_options(
image,
None,
dest_rect,
render_state.sampling_options,
&paint,
);
}
// Restore the canvas to remove the clipping