centaurea_ui/drawable.rs
1use super::{Rect, Pixels, Pixel, Style};
2
3pub trait Drawable<S: Style> {
4 fn fill(&mut self, text: char, style: S);
5
6 fn rect(&mut self, rect: Rect, text: char, style: S);
7
8 fn string(&mut self, x: u16, y: u16, text: String, style: S);
9
10 fn pixels(&mut self, x: u16, y: u16, pixels: &Pixels<S>);
11
12 fn pixel(&mut self, x: u16, y: u16, pixel: Pixel<S>);
13
14 fn pixel_at_index(&mut self, index: usize, pixel: Pixel<S>);
15}