diff options
| author | 2024-05-03 13:51:57 +0200 | |
|---|---|---|
| committer | 2024-05-03 13:51:57 +0200 | |
| commit | a94984d681875146d7af9f568bf8713503c1ca96 (patch) | |
| tree | c0a4eef3b5ab5fc3450b21b37df99542c178f6e0 /renderer/src | |
| parent | 38cf87cb45484c7e52ddf775fb3abd7edbecc652 (diff) | |
| parent | afb4cb99b92a196bf4dd15a09a8f9bd191293fdd (diff) | |
| download | iced-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-- | renderer/src/fallback.rs | 12 | 
1 files changed, 10 insertions, 2 deletions
| diff --git a/renderer/src/fallback.rs b/renderer/src/fallback.rs index a077031b..6a169692 100644 --- a/renderer/src/fallback.rs +++ b/renderer/src/fallback.rs @@ -155,11 +155,18 @@ where          filter_method: image::FilterMethod,          bounds: Rectangle,          rotation: Radians, +        opacity: f32,      ) {          delegate!(              self,              renderer, -            renderer.draw_image(handle, filter_method, bounds, rotation) +            renderer.draw_image( +                handle, +                filter_method, +                bounds, +                rotation, +                opacity +            )          );      }  } @@ -179,11 +186,12 @@ where          color: Option<Color>,          bounds: Rectangle,          rotation: Radians, +        opacity: f32,      ) {          delegate!(              self,              renderer, -            renderer.draw_svg(handle, color, bounds, rotation) +            renderer.draw_svg(handle, color, bounds, rotation, opacity)          );      }  } | 
