diff options
author | 2022-12-06 04:34:00 +0100 | |
---|---|---|
committer | 2022-12-06 04:34:00 +0100 | |
commit | b205a663471a8170d7b30cc59894425c09bea563 (patch) | |
tree | 53514f16226949f1e2440eed8ead4dec968c8d95 /graphics/src/renderer.rs | |
parent | 314b0f7dc52c844669c224060a7b03e842762370 (diff) | |
download | iced-b205a663471a8170d7b30cc59894425c09bea563.tar.gz iced-b205a663471a8170d7b30cc59894425c09bea563.tar.bz2 iced-b205a663471a8170d7b30cc59894425c09bea563.zip |
Remove `appearance` from `Handle`
... and pass it directly to `Renderer::draw` instead.
Diffstat (limited to 'graphics/src/renderer.rs')
-rw-r--r-- | graphics/src/renderer.rs | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/graphics/src/renderer.rs b/graphics/src/renderer.rs index 65350037..aabdf7fc 100644 --- a/graphics/src/renderer.rs +++ b/graphics/src/renderer.rs @@ -6,7 +6,7 @@ use iced_native::layout; use iced_native::renderer; use iced_native::svg; use iced_native::text::{self, Text}; -use iced_native::{Background, Element, Font, Point, Rectangle, Size}; +use iced_native::{Background, Color, Element, Font, Point, Rectangle, Size}; pub use iced_native::renderer::Style; @@ -200,7 +200,16 @@ where self.backend().viewport_dimensions(handle) } - fn draw(&mut self, handle: svg::Handle, bounds: Rectangle) { - self.draw_primitive(Primitive::Svg { handle, bounds }) + fn draw( + &mut self, + handle: svg::Handle, + color: Option<Color>, + bounds: Rectangle, + ) { + self.draw_primitive(Primitive::Svg { + handle, + color, + bounds, + }) } } |