From 0bf1314357af48d97790069679f451b53862f276 Mon Sep 17 00:00:00 2001 From: jakobst1n Date: Wed, 12 Jun 2024 17:15:34 +0200 Subject: Add color to braille and star mode by default --- src/graph.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/graph.rs b/src/graph.rs index a2554f0..1b76ea3 100644 --- a/src/graph.rs +++ b/src/graph.rs @@ -382,7 +382,7 @@ impl GraphBuilder { fn draw_star(&mut self, g: usize) { for i in 0..self.y_values[g].len() { let y = self.draw_height - (self.y_values[g][i] as usize) - 1; - self.draw(i, y, GraphPixel::Normal('*')); + self.draw(i, y, self.color_pixel('*', |px| GraphPixel::Green(px))); } } @@ -437,12 +437,12 @@ impl GraphBuilder { if y1_abs == y2_abs { let pxx = (1 << (y1 % 3)) | (1 << ((y2 % 3) + 3)); - self.draw(i / 2, y1_abs, GraphPixel::Normal(brc6(pxx))); + self.draw(i / 2, y1_abs, self.color_pixel(brc6(pxx), |px| GraphPixel::Green(px))); } else { let pxx1 = 1 << (y1 % 3); - self.draw(i / 2, y1_abs, GraphPixel::Normal(brc6(pxx1))); + self.draw(i / 2, y1_abs, self.color_pixel(brc6(pxx1), |px| GraphPixel::Green(px))); let pxx2 = 1 << ((y2 % 3) + 3); - self.draw(i / 2, y2_abs, GraphPixel::Normal(brc6(pxx2))); + self.draw(i / 2, y2_abs, self.color_pixel(brc6(pxx2), |px| GraphPixel::Green(px))); } i += 2; } -- cgit v1.2.3