aboutsummaryrefslogtreecommitdiffstats
path: root/include/expr.h
diff options
context:
space:
mode:
authoruser <user@clank>2026-09-07 16:21:56 +0200
committeruser <user@clank>2026-09-07 16:21:56 +0200
commit83ca4072aa1934be3456638d3b2597876aa7d2e2 (patch)
tree7ce023a85d263690c9da21c4e8476dd5fd43a3d6 /include/expr.h
parentgraphics: a retransmit invalidates every placement of the image (diff)
downloadslosh-83ca4072aa1934be3456638d3b2597876aa7d2e2.tar.gz
slosh-83ca4072aa1934be3456638d3b2597876aa7d2e2.tar.xz
slosh-83ca4072aa1934be3456638d3b2597876aa7d2e2.zip
graphics: no cell arithmetic at the far edge of an uncut image
A smooth bounce shimmered: anything placed with sub-cell X=/Y= offsets had its source rectangle shaved by a different sliver every frame, so the picture's edges breathed as it moved. dvd.py made it obvious -- the logo's crop wobbled between w=124 and w=130 around a true 142. The pixels-per-cell a placement reports are its own pixels over its own grid, floored, and the grid includes the cell the sub-cell offset spills into, so the figure runs a shade small -- 142px over 19 cells says 7 when the terminal's cell is 8. That was harmless while the number was only used proportionally at real cut edges. The pieces rewrite ran it over every placement: axis_crop() clamped even an uncut image's source to cols * cell_px - offset, and as the offset moved the clamp moved with it. The far edge of a piece that reaches the placement's last cell is where the source runs out; only an interior cut needs the cell arithmetic. With that, an uncut placement's source rect passes through untouched, which is what the old emitter always sent. Two companions in the same sum. A scaled piece so narrow its share of the source rounds to nothing now keeps the pixel it is inside, because w=0 on the wire means "the whole image", which is worse than wrong. And a cut piece whose source is genuinely empty is cells the image never reaches, so it is not placed at all -- the uncut placement stays exempt, since the pane-edge crop has always used 0 for "the rest of it". The headless check places with X=5: the whole source rect must survive the offset, where the clamped code sent w=0.
Diffstat (limited to 'include/expr.h')
0 files changed, 0 insertions, 0 deletions