draw the screen withing its 64x32 size

This commit is contained in:
Denis-Cosmin Nutiu 2024-12-08 23:44:42 +02:00
parent 76e16d6a71
commit 078ca4b8b9

View file

@ -1,3 +1,4 @@
use ratatui::layout::Rect;
use ratatui::style::Color; use ratatui::style::Color;
use ratatui::symbols::Marker; use ratatui::symbols::Marker;
use ratatui::widgets::canvas::Canvas; use ratatui::widgets::canvas::Canvas;
@ -96,7 +97,10 @@ impl Display for RatatuiDisplay {
.y_bounds([0.0, DISPLAY_HEIGHT as f64]); .y_bounds([0.0, DISPLAY_HEIGHT as f64]);
// Render the canvas widget // Render the canvas widget
frame.render_widget(canvas, frame.area()); frame.render_widget(
canvas,
Rect::new(0, 0, DISPLAY_WIDTH as u16, DISPLAY_HEIGHT as u16),
);
}) })
.expect("failed to draw"); .expect("failed to draw");
} }