Fixed off-by-one error in rendering of the 7-segment segments.

This commit is contained in:
2026-05-28 13:29:39 +02:00
parent 2dbdfd213c
commit 6038075e9e
+2 -2
View File
@@ -574,12 +574,12 @@ class Meter {
void draw_segment_(Display &it, int x, int y, int w, int h, bool horizontal, Color color) {
if (horizontal) {
int cap = h / 2;
it.filled_rectangle(x + cap, y, w - 2 * cap, h, color);
it.filled_rectangle(x + cap, y, w - 2 * cap, h +1, color);
it.filled_triangle(x, y + cap, x + cap, y, x + cap, y + h, color);
it.filled_triangle(x + w, y + cap, x + w - cap, y, x + w - cap, y + h, color);
} else {
int cap = w / 2;
it.filled_rectangle(x, y + cap, w, h - 2 * cap, color);
it.filled_rectangle(x, y + cap, w +1, h - 2 * cap, color);
it.filled_triangle(x + cap, y, x, y + cap, x + w, y + cap, color);
it.filled_triangle(x + cap, y + h, x, y + h - cap, x + w, y + h - cap, color);
}