summaryrefslogtreecommitdiffstats
path: root/examples/ggez/renderer.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--examples/ggez/renderer.rs26
1 files changed, 26 insertions, 0 deletions
diff --git a/examples/ggez/renderer.rs b/examples/ggez/renderer.rs
new file mode 100644
index 00000000..ae6e3250
--- /dev/null
+++ b/examples/ggez/renderer.rs
@@ -0,0 +1,26 @@
+mod text;
+
+use ggez::graphics::{self, Color};
+use ggez::Context;
+
+pub struct Renderer<'a> {
+ pub context: &'a mut Context,
+}
+
+impl Renderer<'_> {
+ pub fn flush(&mut self) {
+ graphics::draw_queued_text(
+ self.context,
+ graphics::DrawParam::default(),
+ Default::default(),
+ graphics::FilterMode::Linear,
+ )
+ .expect("Draw text");
+ }
+}
+
+impl iced::Renderer for Renderer<'_> {
+ type Color = Color;
+
+ fn explain(&mut self, layout: &iced::Layout<'_>, color: Color) {}
+}