From 04f554f29c112c1767db13217ed93f6a56d1ffa0 Mon Sep 17 00:00:00 2001 From: Juergen Stuber Date: Mon, 11 Nov 2024 23:34:12 +0100 Subject: [PATCH] Equalize height of top bar and vertical strokes --- src/bin/primes/main.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/bin/primes/main.rs b/src/bin/primes/main.rs index bdebf66..ab8e225 100644 --- a/src/bin/primes/main.rs +++ b/src/bin/primes/main.rs @@ -88,7 +88,7 @@ fn render_zero(frame: &mut Frame, pos: &mut Point2d) { const STROKE_LEN: i64 = 11; const STROKE_MID: i64 = 5; -const HEIGHT: i64 = 12; +const HEIGHT: i64 = 11; const MIN_LINE_SEP: i64 = 1; const MIN_MARGIN: i64 = 1; @@ -104,7 +104,10 @@ fn render_vertical(frame: &mut Frame, pos: &mut Point2d, digit: u32) { } if five { for j in 0..STROKE_LEN { - frame.set(*pos + v2d(ones - 1 - STROKE_MID + j, 11), Pixel::Foreground); + frame.set( + *pos + v2d(ones - 1 - STROKE_MID + j, HEIGHT - 1), + Pixel::Foreground, + ); } } *pos += v2d(2 * ones - 1, 0);