Introduce dynamic opacity support for Image and Svg
This commit is contained in:
parent
38cf87cb45
commit
fa9e1d96ea
18 changed files with 142 additions and 33 deletions
|
|
@ -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,
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue