reflow-firmware2.0/src/st7735/gfx.rs

31 lines
925 B
Rust

pub trait PrimitveGFX {
type ColorType;
type CoordinateType;
fn draw_pixel(&mut self,
x: Self::CoordinateType,
y: Self::CoordinateType,
color: Self::ColorType);
fn fill_rect(&mut self,
x: Self::CoordinateType,
y: Self::CoordinateType,
w: Self::CoordinateType,
h: Self::CoordinateType,
color: Self::ColorType);
fn draw_fast_vline(&mut self,
x: Self::CoordinateType,
y: Self::CoordinateType,
h: Self::CoordinateType,
color: Self::ColorType);
fn draw_fast_hline(&mut self,
x: Self::CoordinateType,
y: Self::CoordinateType,
w: Self::CoordinateType,
color: Self::ColorType);
}