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
|
|
@ -122,12 +122,14 @@ impl Layer {
|
|||
bounds: Rectangle,
|
||||
transformation: Transformation,
|
||||
rotation: Radians,
|
||||
opacity: f32,
|
||||
) {
|
||||
let image = Image::Raster {
|
||||
handle,
|
||||
filter_method,
|
||||
bounds: bounds * transformation,
|
||||
rotation,
|
||||
opacity,
|
||||
};
|
||||
|
||||
self.images.push(image);
|
||||
|
|
@ -140,12 +142,14 @@ impl Layer {
|
|||
bounds: Rectangle,
|
||||
transformation: Transformation,
|
||||
rotation: Radians,
|
||||
opacity: f32,
|
||||
) {
|
||||
let svg = Image::Vector {
|
||||
handle,
|
||||
color,
|
||||
bounds: bounds * transformation,
|
||||
rotation,
|
||||
opacity,
|
||||
};
|
||||
|
||||
self.images.push(svg);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue