feat: a reserved hole is shaded, so a sub-pixel gap is still a report

This commit is contained in:
Martino Ferrari committed 2026-10-08 20:12:38 +02:00
1 parent b32987d7e0
commit ee55ac84b7
3 files changed
+36

No files matched your search

+17
View File
@@ -371,6 +371,23 @@ void RowSet::bind(ScopeModel& model, DisplayMode mode) {
}
}
void RowSet::set_invalid_spans(ScopeModel& model, DisplayMode mode) {
spans_.clear();
if (mode == DisplayMode::Live || mode == DisplayMode::Capturing) {
// `Hole::x_begin`/`x_end` are stream seconds; the plots' x is `stream_t + epoch`.
const f64 epoch = model.display_epoch();
for (const Hole& h : model.holes()) {
spans_.emplace_back(h.x_begin + epoch, h.x_end + epoch);
}
}
for (int i = 0; i < rows_; ++i) {
Row& r = row(i);
// Every row shares the one x window, so every row gets the same spans: a hole is a gap in
// the stream and not in one signal.
if (r.plot) r.plot->set_invalid_spans(spans_);
}
}
bool RowSet::live_edge(double& newest) const {
bool any = false;
for (int i = 0; i < rows_; ++i) {