diff options
Diffstat (limited to 'evc/src/debug.rs')
-rw-r--r-- | evc/src/debug.rs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/evc/src/debug.rs b/evc/src/debug.rs index fb2b53d..06dd507 100644 --- a/evc/src/debug.rs +++ b/evc/src/debug.rs @@ -16,7 +16,7 @@ impl View<&mut Frame> { } impl Frame { - pub fn draw_line(&mut self, start: Vec2<isize>, end: Vec2<isize>, color: Pixel) { + pub fn draw_line(&mut self, start: Vec2<f32>, end: Vec2<f32>, color: Pixel) { let (sx, sy) = (start.x as f32, start.y as f32); let (ex, ey) = (end.x as f32, end.y as f32); let (dx, dy) = (ex - sx, ey - sy); @@ -43,4 +43,14 @@ impl Pixel { pub const RED: Pixel = Pixel { r: 255, g: 0, b: 0 }; pub const GREEN: Pixel = Pixel { r: 0, g: 255, b: 0 }; pub const BLUE: Pixel = Pixel { r: 0, g: 0, b: 255 }; + pub const MAGENTA: Pixel = Pixel { + r: 255, + g: 0, + b: 255, + }; + pub const CYAN: Pixel = Pixel { + r: 0, + g: 255, + b: 255, + }; } |