diff options
author | metamuffin <metamuffin@disroot.org> | 2022-12-07 20:38:00 +0100 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2022-12-07 20:38:00 +0100 |
commit | 9d7986bbfd44b69a623fa29528b5d13000b91c77 (patch) | |
tree | 8da95f328243a96acec6c3ea6ebddc71bb63f05c /evc/src/debug.rs | |
parent | 7be0d5039db7e8660bced13698178bf1d6758109 (diff) | |
download | video-codec-experiments-9d7986bbfd44b69a623fa29528b5d13000b91c77.tar video-codec-experiments-9d7986bbfd44b69a623fa29528b5d13000b91c77.tar.bz2 video-codec-experiments-9d7986bbfd44b69a623fa29528b5d13000b91c77.tar.zst |
advanced translate
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, + }; } |