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/layer.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/layer.rs')
-rw-r--r-- | tiny_skia/src/layer.rs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tiny_skia/src/layer.rs b/tiny_skia/src/layer.rs index 3e42e4aa..c907c93c 100644 --- a/tiny_skia/src/layer.rs +++ b/tiny_skia/src/layer.rs @@ -1,7 +1,7 @@ -use crate::core::image; -use crate::core::renderer::Quad; -use crate::core::svg; -use crate::core::{Background, Color, Point, Rectangle, Transformation}; +use crate::core::{ + image, renderer::Quad, svg, Background, Color, Point, Radians, Rectangle, + Transformation, +}; use crate::graphics::damage; use crate::graphics::layer; use crate::graphics::text::{Editor, Paragraph, Text}; @@ -121,11 +121,13 @@ impl Layer { filter_method: image::FilterMethod, bounds: Rectangle, transformation: Transformation, + rotation: Radians, ) { let image = Image::Raster { handle, filter_method, bounds: bounds * transformation, + rotation, }; self.images.push(image); @@ -137,11 +139,13 @@ impl Layer { color: Option<Color>, bounds: Rectangle, transformation: Transformation, + rotation: Radians, ) { let svg = Image::Vector { handle, color, bounds: bounds * transformation, + rotation, }; self.images.push(svg); |