summaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector@hecrj.dev>2024-05-03 13:51:57 +0200
committerLibravatar GitHub <noreply@github.com>2024-05-03 13:51:57 +0200
commita94984d681875146d7af9f568bf8713503c1ca96 (patch)
treec0a4eef3b5ab5fc3450b21b37df99542c178f6e0 /graphics
parent38cf87cb45484c7e52ddf775fb3abd7edbecc652 (diff)
parentafb4cb99b92a196bf4dd15a09a8f9bd191293fdd (diff)
downloadiced-a94984d681875146d7af9f568bf8713503c1ca96.tar.gz
iced-a94984d681875146d7af9f568bf8713503c1ca96.tar.bz2
iced-a94984d681875146d7af9f568bf8713503c1ca96.zip
Merge pull request #2424 from iced-rs/feature/image-opacity
Introduce dynamic `opacity` support for `Image` and `Svg`
Diffstat (limited to '')
-rw-r--r--graphics/src/image.rs10
1 files changed, 8 insertions, 2 deletions
diff --git a/graphics/src/image.rs b/graphics/src/image.rs
index 9d09bf4c..318592be 100644
--- a/graphics/src/image.rs
+++ b/graphics/src/image.rs
@@ -18,8 +18,11 @@ pub enum Image {
/// The bounds of the image.
bounds: Rectangle,
- /// The rotation of the image in radians
+ /// The rotation of the image.
rotation: Radians,
+
+ /// The opacity of the image.
+ opacity: f32,
},
/// A vector image.
Vector {
@@ -32,8 +35,11 @@ pub enum Image {
/// The bounds of the image.
bounds: Rectangle,
- /// The rotation of the image in radians
+ /// The rotation of the image.
rotation: Radians,
+
+ /// The opacity of the image.
+ opacity: f32,
},
}