mirror of
https://github.com/penpot/penpot.git
synced 2025-06-01 11:21:39 +02: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:
parent
0eaa43f36b
commit
27d15763f8
1 changed files with 7 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue