summaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2021-10-18 14:47:49 +0700
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2021-10-18 14:47:49 +0700
commita4f4d831615899046d36c96e6a580d5386aa25bf (patch)
tree3b589d57778b7e62584aa2b5832dd3f81b2a8717 /graphics
parentdfceee99aad9462f09ca61081e68e1decb2fed92 (diff)
downloadiced-a4f4d831615899046d36c96e6a580d5386aa25bf.tar.gz
iced-a4f4d831615899046d36c96e6a580d5386aa25bf.tar.bz2
iced-a4f4d831615899046d36c96e6a580d5386aa25bf.zip
Introduce `fill_rectangle` to `Renderer` trait
Diffstat (limited to 'graphics')
-rw-r--r--graphics/src/renderer.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/graphics/src/renderer.rs b/graphics/src/renderer.rs
index 91f6b550..7ed06151 100644
--- a/graphics/src/renderer.rs
+++ b/graphics/src/renderer.rs
@@ -70,6 +70,16 @@ where
});
}
+ fn fill_rectangle(&mut self, quad: renderer::Quad) {
+ self.primitives.push(Primitive::Quad {
+ bounds: quad.bounds,
+ background: quad.background,
+ border_radius: quad.border_radius,
+ border_width: quad.border_width,
+ border_color: quad.border_color,
+ });
+ }
+
fn clear(&mut self) {
self.primitives.clear();
}