pub trait Graphics {
// Required methods
fn clear_pixel(&mut self, x: usize, y: usize);
fn draw_pixel(&mut self, x: usize, y: usize);
}Expand description
Graphics abstraction for Chip8.
Clients are supposed to implement this trait in accordance with the graphics library used.
Required Methods§
Sourcefn clear_pixel(&mut self, x: usize, y: usize)
fn clear_pixel(&mut self, x: usize, y: usize)
Clears/turns off a pixel on a specific coordinate.
Sourcefn draw_pixel(&mut self, x: usize, y: usize)
fn draw_pixel(&mut self, x: usize, y: usize)
Draws/turns on a pixel on a specific coordinate.