feat(ui): trail map — filled/open dot markers around segment breaks

A 3×3 filled square is drawn at the last point of each segment before
a break, and a 3×3 outline square at the first point after the break.
The user can now see where tracking paused and resumed at a glance,
without confusing the gap with sparse sampling.

Start (`+`) and current (`×`) markers unchanged.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Jakub
2026-05-25 10:41:09 +02:00
parent b12d5a8705
commit 4eb4e78a3f

View File

@@ -274,8 +274,9 @@ private:
};
// Draw connected segments. A point flagged SEG_START starts a new segment;
// its predecessor is not joined to it. Single-point segments still get a
// visible pixel.
// its predecessor is not joined to it. At every break we mark the segment
// end (filled dot) and the resume point (open dot) so the user can see
// where tracking paused.
int x0, y0;
project(_store->at(0), x0, y0);
display.fillRect(x0, y0, 1, 1);
@@ -283,7 +284,8 @@ private:
int x1, y1;
project(_store->at(i), x1, y1);
if (_store->at(i).flags & TRAIL_FLAG_SEG_START) {
display.fillRect(x1, y1, 1, 1); // mark the segment's first point
drawFilledDot(display, x0, y0); // end of the previous segment
drawOpenDot(display, x1, y1); // resume point
} else {
drawLine(display, x0, y0, x1, y1);
}
@@ -312,6 +314,19 @@ private:
}
}
// 3×3 filled square — end of a segment before a break.
static void drawFilledDot(DisplayDriver& d, int cx, int cy) {
d.fillRect(cx - 1, cy - 1, 3, 3);
}
// 3×3 outline square — start of a segment after a break (resume point).
static void drawOpenDot(DisplayDriver& d, int cx, int cy) {
d.fillRect(cx - 1, cy - 1, 3, 1); // top
d.fillRect(cx - 1, cy + 1, 3, 1); // bottom
d.fillRect(cx - 1, cy, 1, 1); // left
d.fillRect(cx + 1, cy, 1, 1); // right
}
// 5×5 plus-sign marker for the start point.
static void drawStartMarker(DisplayDriver& d, int cx, int cy) {
d.fillRect(cx - 2, cy, 5, 1);