diff options
author | 2021-10-18 14:47:49 +0700 | |
---|---|---|
committer | 2021-10-18 14:47:49 +0700 | |
commit | a4f4d831615899046d36c96e6a580d5386aa25bf (patch) | |
tree | 3b589d57778b7e62584aa2b5832dd3f81b2a8717 /graphics | |
parent | dfceee99aad9462f09ca61081e68e1decb2fed92 (diff) | |
download | iced-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.rs | 10 |
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(); } |