Expand description
Presentation canvas synthesis (src/core/framing.ts): layout/coordinate mapping, background-extension
statistics, and the two per-tile passes buildFramedCanvas drives (chrome/content copy, then source-tile
evidence fold). Tile-cache traversal, the O(perimeter) candidate pre-check and KV writes stay in TS.
Structs§
- Layout
- Presentation layout: native chrome (
pane) plus a decorative background-extension band wrapped around the live content rect (content), matchingframeLayout. - Output
Tile - Output tile buffers
buildFramedCanvasmutates.frozenis written by the evidence fold, not read. - Source
Tile - One resident source tile the evidence fold reads from.
Enums§
- Coordinate
- Native source coordinate for a context pixel:
Noneis a decorative extension,Some(None)is reconstructed content,Some(Some((x, y)))is a native-chrome pixel copied from the reference frame.
Functions§
- backgrounds
- One sampled row/column per background axis, matching
backgrounds(): the modal pixel sampled everymax(1, floor(pane.dim / 128))columns/rows across the pane. - fold_
evidence - Evidence fold (
buildFramedCanvas’s pass 2) for one output tile against up to four overlapping source tiles: copies covered source pixels into the tile (healing provisional bits, carrying coverage), then folds each touched 16×16 block’s quality/score/owner/conflicts/frozen into the destination block. - frame_
coordinate - frame_
layout - paint_
tile - Chrome/content synthesis (
buildFramedCanvas’s pass 1) for one output tile: every pixel ofbounds(already clipped to the framed canvas) either copies a native reference pixel, paints a background band, or is left untouched (reconstructed-content interior, filled later byfold_evidence).