summaryrefslogtreecommitdiffstats
path: root/native/src/renderer.rs
diff options
context:
space:
mode:
Diffstat (limited to 'native/src/renderer.rs')
-rw-r--r--native/src/renderer.rs13
1 files changed, 12 insertions, 1 deletions
diff --git a/native/src/renderer.rs b/native/src/renderer.rs
index 5a7a0067..382edb61 100644
--- a/native/src/renderer.rs
+++ b/native/src/renderer.rs
@@ -29,7 +29,7 @@ mod null;
pub use null::Null;
use crate::layout;
-use crate::{Element, Rectangle, Vector};
+use crate::{Background, Color, Element, Rectangle, Vector};
/// A component that can take the state of a user interface and produce an
/// output for its users.
@@ -59,4 +59,15 @@ pub trait Renderer: Sized {
);
fn clear(&mut self);
+
+ fn fill_rectangle(&mut self, quad: Quad);
+}
+
+#[derive(Debug, Clone, Copy, PartialEq)]
+pub struct Quad {
+ pub bounds: Rectangle,
+ pub background: Background,
+ pub border_radius: f32,
+ pub border_width: f32,
+ pub border_color: Color,
}