use super::*; pub struct Pixel { position: Vec2, color: Color, } impl Pixel { #[must_use] pub fn new(position: Vec2, color: Color) -> Self { Pixel { position, color } } } impl Draw for Pixel { fn draw(&self, canvas: &mut impl Canvas) { canvas.blit_pixel(self.position.x, self.position.y, self.color); } }