summaryrefslogtreecommitdiffstats
path: root/graphics/src
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2021-11-04 19:22:29 +0700
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2021-11-04 19:24:11 +0700
commit023aded2772f0cd6abd716fe5c8624d5d22e21fa (patch)
tree1bdb1a4584d7acc688b081a299bb4431cd35c349 /graphics/src
parent343f9b7e2e594bd1fef1ed511d71e81f9c44e3d9 (diff)
downloadiced-023aded2772f0cd6abd716fe5c8624d5d22e21fa.tar.gz
iced-023aded2772f0cd6abd716fe5c8624d5d22e21fa.tar.bz2
iced-023aded2772f0cd6abd716fe5c8624d5d22e21fa.zip
Rename `fill_rectangle` to `fill_quad` in `Renderer`
Diffstat (limited to 'graphics/src')
-rw-r--r--graphics/src/renderer.rs10
1 files changed, 7 insertions, 3 deletions
diff --git a/graphics/src/renderer.rs b/graphics/src/renderer.rs
index df9f1ac0..30f9d40e 100644
--- a/graphics/src/renderer.rs
+++ b/graphics/src/renderer.rs
@@ -3,7 +3,7 @@ use crate::{Primitive, Vector};
use iced_native::layout;
use iced_native::renderer;
use iced_native::text::{self, Text};
-use iced_native::{Element, Font, Point, Rectangle, Size};
+use iced_native::{Background, Element, Font, Point, Rectangle, Size};
pub use iced_native::renderer::Style;
@@ -88,10 +88,14 @@ where
});
}
- fn fill_rectangle(&mut self, quad: renderer::Quad) {
+ fn fill_quad(
+ &mut self,
+ quad: renderer::Quad,
+ background: impl Into<Background>,
+ ) {
self.primitives.push(Primitive::Quad {
bounds: quad.bounds,
- background: quad.background,
+ background: background.into(),
border_radius: quad.border_radius,
border_width: quad.border_width,
border_color: quad.border_color,