Skip to content

fix(render): remove seams between color blocks - #189

Merged
cpendery (cpendery) merged 5 commits into
mainfrom
fix/gif-color-block-seams
Aug 27, 2026
Merged

fix(render): remove seams between color blocks#189
cpendery (cpendery) merged 5 commits into
mainfrom
fix/gif-color-block-seams

Conversation

@cpendery

@cpendery cpendery (cpendery) commented Aug 27, 2026

Copy link
Copy Markdown
Member

Summary

  • rasterize consecutive same-color backgrounds as runs whose shared cell edges snap to identical output pixels
  • align block, underline, and bar cursors to that same pixel grid so fractional zoom cannot leave a gap beside the cursor
  • use explicit fill_antialiased_rect and fill_pixel_rect helpers instead of the ambiguous regular/crisp rectangle distinction
  • cover multi-row color runs, a full-width trailing run, and cursor adjacency at gap-prone fractional zoom levels
  • run the static-media generator, retain its visually changed 25% APNG, and add fractional pixel-alignment GIF/PNG render snapshots

Validation

  • cargo clippy -p tui-test-rs --all-targets --all-features -- -D warnings
  • cargo test -p tui-test-rs --all-features -- --test-threads=1
  • bash scripts/regenerate-static-media.sh
  • cargo test -p tui-test-rs --all-features single_frame_gif_and_png_renders_match_snapshots

Before and after

Both captures use the same terminal content and --zoom 0.625. The first two rows are equal-width 30-cell comparisons with the cursor hidden. The third row deliberately shows the cursor after a 29-cell green run, isolating cursor alignment instead of accidentally appending it to the color comparison.

The solid bar drops from 30 off-color seam pixels to 0. At the cursor boundary, the before image contains a blended transition pixel; the after image ends the green run and starts the full cursor cell on one shared pixel edge.

Before After
Before: seams in color runs and a blended cursor boundary After: seamless color runs and a pixel-aligned cursor boundary

@cpendery
cpendery (cpendery) marked this pull request as ready for review August 27, 2026 18:16
@cpendery
cpendery (cpendery) merged commit 5bdcac8 into main Aug 27, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant