mirror of
https://github.com/penpot/penpot.git
synced 2025-12-12 06:24:17 +01:00
🐛 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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user