summaryrefslogtreecommitdiffstats
path: root/tiny_skia/src/layer.rs
diff options
context:
space:
mode:
authorLibravatar gigas002 <gigas002@pm.me>2024-05-08 19:16:06 +0900
committerLibravatar gigas002 <gigas002@pm.me>2024-05-08 19:16:06 +0900
commit477887b3870aa5fbdab96c3a06f3b930462d7842 (patch)
tree2b3272bb178f8757169511966589fe6a106733f4 /tiny_skia/src/layer.rs
parent0ebe0629cef37aee5c48b9409fc36618a3a3e60d (diff)
parente07b42ac96b8d098a883c93afe828a439f479c7b (diff)
downloadiced-477887b3870aa5fbdab96c3a06f3b930462d7842.tar.gz
iced-477887b3870aa5fbdab96c3a06f3b930462d7842.tar.bz2
iced-477887b3870aa5fbdab96c3a06f3b930462d7842.zip
Merge branch 'master' of https://github.com/iced-rs/iced into iced-rs-master
Diffstat (limited to '')
-rw-r--r--tiny_skia/src/layer.rs16
1 files changed, 12 insertions, 4 deletions
diff --git a/tiny_skia/src/layer.rs b/tiny_skia/src/layer.rs
index 3e42e4aa..48fca1d8 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,15 @@ impl Layer {
filter_method: image::FilterMethod,
bounds: Rectangle,
transformation: Transformation,
+ rotation: Radians,
+ opacity: f32,
) {
let image = Image::Raster {
handle,
filter_method,
bounds: bounds * transformation,
+ rotation,
+ opacity,
};
self.images.push(image);
@@ -137,11 +141,15 @@ impl Layer {
color: Option<Color>,
bounds: Rectangle,
transformation: Transformation,
+ rotation: Radians,
+ opacity: f32,
) {
let svg = Image::Vector {
handle,
color,
bounds: bounds * transformation,
+ rotation,
+ opacity,
};
self.images.push(svg);