Introduce fill_rectangle to Renderer trait

This commit is contained in:
Héctor Ramón Jiménez 2021-10-18 14:47:49 +07:00
parent dfceee99aa
commit a4f4d83161
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
3 changed files with 24 additions and 1 deletions

View file

@ -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();
}