summaryrefslogtreecommitdiffstats
path: root/wgpu/src/layer.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector@hecrj.dev>2024-05-03 07:31:34 +0200
committerLibravatar GitHub <noreply@github.com>2024-05-03 07:31:34 +0200
commit1cefe6be210cdae8c6769673e8d23c6781a988f1 (patch)
tree7d4a383412e6bd69d0cc1b32f996ba7cf6ef892e /wgpu/src/layer.rs
parentfe240a93aacd15bd3fa75876054753a53bda9054 (diff)
parent4010e3983d40e24a5d7b590d8fec9801651199ce (diff)
downloadiced-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 'wgpu/src/layer.rs')
-rw-r--r--wgpu/src/layer.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/wgpu/src/layer.rs b/wgpu/src/layer.rs
index 9526c5a8..e0242c59 100644
--- a/wgpu/src/layer.rs
+++ b/wgpu/src/layer.rs
@@ -1,5 +1,6 @@
-use crate::core::renderer;
-use crate::core::{Background, Color, Point, Rectangle, Transformation};
+use crate::core::{
+ renderer, Background, Color, Point, Radians, Rectangle, Transformation,
+};
use crate::graphics;
use crate::graphics::color;
use crate::graphics::layer;
@@ -117,11 +118,13 @@ impl Layer {
filter_method: crate::core::image::FilterMethod,
bounds: Rectangle,
transformation: Transformation,
+ rotation: Radians,
) {
let image = Image::Raster {
handle,
filter_method,
bounds: bounds * transformation,
+ rotation,
};
self.images.push(image);
@@ -133,11 +136,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);