Accept a tile halo that the frame's edge cuts short

The test demanded a full halo on every side except the frame's own
edge, but a tile one step in from it is grown to the edge and no
further, exactly where the untiled render stops too.
This commit is contained in:
2026-09-27 17:37:06 -04:00
parent 87b2599740
commit 89b464db0c
+6 -5
View File
@@ -139,11 +139,12 @@ mod tests {
assert!(gw <= max && gh <= max, "{t:?} does not fit");
assert_eq!(gx % TILE_ALIGN, 0, "{t:?} starts off the grid");
assert_eq!(gy % TILE_ALIGN, 0, "{t:?} starts off the grid");
// The halo is there on every side the frame does not end.
assert!(kx == 0 || kx - gx >= halo);
assert!(ky == 0 || ky - gy >= halo);
assert!(kx + kw == frame.0 || gx + gw - (kx + kw) >= halo);
assert!(ky + kh == frame.1 || gy + gh - (ky + kh) >= halo);
// The halo is there on every side, or the frame ends first — in
// which case the untiled render stops at the same edge.
assert!(gx == 0 || kx - gx >= halo);
assert!(gy == 0 || ky - gy >= halo);
assert!(gx + gw == frame.0 || gx + gw - (kx + kw) >= halo);
assert!(gy + gh == frame.1 || gy + gh - (ky + kh) >= halo);
}
}