Implement Widget::draw for Image
This commit is contained in:
parent
e7ae442231
commit
1afbc98544
3 changed files with 17 additions and 2 deletions
|
|
@ -26,6 +26,10 @@ impl<B: Backend> Renderer<B> {
|
|||
&self.backend
|
||||
}
|
||||
|
||||
pub fn draw_primitive(&mut self, primitive: Primitive) {
|
||||
self.primitives.push(primitive);
|
||||
}
|
||||
|
||||
pub fn present(&mut self, f: impl FnOnce(&mut B, &[Primitive])) {
|
||||
f(&mut self.backend, &self.primitives);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue