diff options
author | 2024-05-03 07:31:34 +0200 | |
---|---|---|
committer | 2024-05-03 07:31:34 +0200 | |
commit | 1cefe6be210cdae8c6769673e8d23c6781a988f1 (patch) | |
tree | 7d4a383412e6bd69d0cc1b32f996ba7cf6ef892e /tiny_skia/src/lib.rs | |
parent | fe240a93aacd15bd3fa75876054753a53bda9054 (diff) | |
parent | 4010e3983d40e24a5d7b590d8fec9801651199ce (diff) | |
download | iced-1cefe6be210cdae8c6769673e8d23c6781a988f1.tar.gz iced-1cefe6be210cdae8c6769673e8d23c6781a988f1.tar.bz2 iced-1cefe6be210cdae8c6769673e8d23c6781a988f1.zip |
Merge pull request #2334 from DKolter/image-rotation
Adding feature: Image rotation
Diffstat (limited to 'tiny_skia/src/lib.rs')
-rw-r--r-- | tiny_skia/src/lib.rs | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/tiny_skia/src/lib.rs b/tiny_skia/src/lib.rs index 4c2c9430..75aaaf92 100644 --- a/tiny_skia/src/lib.rs +++ b/tiny_skia/src/lib.rs @@ -29,7 +29,7 @@ pub use geometry::Geometry; use crate::core::renderer; use crate::core::{ - Background, Color, Font, Pixels, Point, Rectangle, Transformation, + Background, Color, Font, Pixels, Point, Radians, Rectangle, Transformation, }; use crate::engine::Engine; use crate::graphics::compositor; @@ -377,9 +377,16 @@ impl core::image::Renderer for Renderer { handle: Self::Handle, filter_method: core::image::FilterMethod, bounds: Rectangle, + rotation: Radians, ) { let (layer, transformation) = self.layers.current_mut(); - layer.draw_image(handle, filter_method, bounds, transformation); + layer.draw_image( + handle, + filter_method, + bounds, + transformation, + rotation, + ); } } @@ -397,9 +404,10 @@ impl core::svg::Renderer for Renderer { handle: core::svg::Handle, color: Option<Color>, bounds: Rectangle, + rotation: Radians, ) { let (layer, transformation) = self.layers.current_mut(); - layer.draw_svg(handle, color, bounds, transformation); + layer.draw_svg(handle, color, bounds, transformation, rotation); } } |