diff options
author | 2024-05-03 13:25:58 +0200 | |
---|---|---|
committer | 2024-05-03 13:25:58 +0200 | |
commit | fa9e1d96ea1924b51749b775ea0e67e69bc8a305 (patch) | |
tree | 20cb13d6e3074569a15a16c8b0d261b1875a2045 /tiny_skia/src/vector.rs | |
parent | 38cf87cb45484c7e52ddf775fb3abd7edbecc652 (diff) | |
download | iced-fa9e1d96ea1924b51749b775ea0e67e69bc8a305.tar.gz iced-fa9e1d96ea1924b51749b775ea0e67e69bc8a305.tar.bz2 iced-fa9e1d96ea1924b51749b775ea0e67e69bc8a305.zip |
Introduce dynamic `opacity` support for `Image` and `Svg`
Diffstat (limited to 'tiny_skia/src/vector.rs')
-rw-r--r-- | tiny_skia/src/vector.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tiny_skia/src/vector.rs b/tiny_skia/src/vector.rs index 8e3463f2..bbe08cb8 100644 --- a/tiny_skia/src/vector.rs +++ b/tiny_skia/src/vector.rs @@ -34,6 +34,7 @@ impl Pipeline { handle: &Handle, color: Option<Color>, bounds: Rectangle, + opacity: f32, pixels: &mut tiny_skia::PixmapMut<'_>, transform: Transform, clip_mask: Option<&tiny_skia::Mask>, @@ -47,7 +48,10 @@ impl Pipeline { bounds.x as i32, bounds.y as i32, image, - &tiny_skia::PixmapPaint::default(), + &tiny_skia::PixmapPaint { + opacity, + ..tiny_skia::PixmapPaint::default() + }, transform, clip_mask, ); |