2nd Pass Render

This commit is contained in:
2026-08-05 16:21:17 -04:00
parent 2f96dd3da5
commit 67524206fb
23 changed files with 251 additions and 89 deletions
+7 -7
View File
@@ -174,9 +174,9 @@ static void testHitToggleAndTail() {
L.tail.y + L.tail.height / 2, L) == FooterHit::Tail);
// The count label is a passive readout — never a hit target.
CHECK(hitTestFooterBar(L.count.x + L.count.width / 2,
L.count.y + L.count.height / 2, L) == FooterHit::None);
L.count.y + L.count.height / 2, L) == FooterHit::Invalid);
// Between the toggle and the count (the gap) is a clean miss.
CHECK(hitTestFooterBar(L.toggle.x + L.toggle.width, L.toggle.y, L) == FooterHit::None);
CHECK(hitTestFooterBar(L.toggle.x + L.toggle.width, L.toggle.y, L) == FooterHit::Invalid);
}
// Half-open bounds: far edges excluded; points outside every box miss.
@@ -184,12 +184,12 @@ static void testHitEdgesAndOutside() {
const FooterBarSpec s = roundSpec();
FooterRect f{0, 100, 700, 26};
const FooterBarLayout L = computeFooterBar(f, s);
CHECK(hitTestFooterBar(L.toggle.x - 1, L.toggle.y, L) == FooterHit::None);
CHECK(hitTestFooterBar(L.tail.x + L.tail.width, L.tail.y, L) == FooterHit::None); // right edge excl
CHECK(hitTestFooterBar(L.toggle.x, L.toggle.y - 1, L) == FooterHit::None); // above
CHECK(hitTestFooterBar(L.toggle.x, L.toggle.y + L.toggle.height, L) == FooterHit::None); // below excl
CHECK(hitTestFooterBar(L.toggle.x - 1, L.toggle.y, L) == FooterHit::Invalid);
CHECK(hitTestFooterBar(L.tail.x + L.tail.width, L.tail.y, L) == FooterHit::Invalid); // right edge excl
CHECK(hitTestFooterBar(L.toggle.x, L.toggle.y - 1, L) == FooterHit::Invalid); // above
CHECK(hitTestFooterBar(L.toggle.x, L.toggle.y + L.toggle.height, L) == FooterHit::Invalid); // below excl
// Far right (the prune/version region) is not this module's — a clean None here.
CHECK(hitTestFooterBar(f.x + f.width - 10, L.toggle.y, L) == FooterHit::None);
CHECK(hitTestFooterBar(f.x + f.width - 10, L.toggle.y, L) == FooterHit::Invalid);
}
// A suppressed box claims no point — a Tail hit-test where the Tail was dropped is None.