diff options
author | 2024-05-02 13:15:17 +0200 | |
---|---|---|
committer | 2024-05-02 17:27:45 +0200 | |
commit | 09a6bcfffc24f5abdc8709403bab7ae1e01563f1 (patch) | |
tree | 8a09792cd01cb56a3a5d11184a60009f8a22a85f /wgpu/src/lib.rs | |
parent | aae8e4f5cfabfc3725ac938023fa29a6737a380c (diff) | |
download | iced-09a6bcfffc24f5abdc8709403bab7ae1e01563f1.tar.gz iced-09a6bcfffc24f5abdc8709403bab7ae1e01563f1.tar.bz2 iced-09a6bcfffc24f5abdc8709403bab7ae1e01563f1.zip |
Add `Image` rotation support
Co-authored-by: DKolter <68352124+DKolter@users.noreply.github.com>
Diffstat (limited to 'wgpu/src/lib.rs')
-rw-r--r-- | wgpu/src/lib.rs | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/wgpu/src/lib.rs b/wgpu/src/lib.rs index 178522de..a42d71c3 100644 --- a/wgpu/src/lib.rs +++ b/wgpu/src/lib.rs @@ -517,9 +517,18 @@ impl core::image::Renderer for Renderer { handle: Self::Handle, filter_method: core::image::FilterMethod, bounds: Rectangle, + rotation: f32, + scale: Size, ) { let (layer, transformation) = self.layers.current_mut(); - layer.draw_image(handle, filter_method, bounds, transformation); + layer.draw_image( + handle, + filter_method, + bounds, + transformation, + rotation, + scale, + ); } } @@ -534,9 +543,18 @@ impl core::svg::Renderer for Renderer { handle: core::svg::Handle, color_filter: Option<Color>, bounds: Rectangle, + rotation: f32, + scale: Size, ) { let (layer, transformation) = self.layers.current_mut(); - layer.draw_svg(handle, color_filter, bounds, transformation); + layer.draw_svg( + handle, + color_filter, + bounds, + transformation, + rotation, + scale, + ); } } |