Skip to content

fix: honour screen-blit's :width and :height arguments - #18

Merged
takeokunn merged 2 commits into
mainfrom
fix/screen-blit-clip-arguments
Aug 9, 2026
Merged

fix: honour screen-blit's :width and :height arguments#18
takeokunn merged 2 commits into
mainfrom
fix/screen-blit-clip-arguments

Conversation

@takeokunn

Copy link
Copy Markdown
Collaborator

screen-blit accepted, validated, declared and then never used its :width and :height arguments — the clip bounds derived only from the source and destination extents. A bounded blit therefore copied the whole overlap instead of the requested region, contradicting the docstring.

Consumers are affected: cl-asciiquarium's incremental renderer expressed its entire right/bottom clip through exactly these two arguments, so it painted outside the region it had cleared.

The clamp applies only when the caller actually supplied the argument. An omitted one still means "the whole source" — clamping by its default as well truncated a negative :src-x copy, which an earlier revision of this branch did and a regression test now pins.

Verification: nix flake check exit 0, 1696 passed / 0 failed.

@takeokunn
takeokunn merged commit 67d9abd into main Aug 9, 2026
1 of 3 checks passed
@takeokunn
takeokunn deleted the fix/screen-blit-clip-arguments branch August 9, 2026 12:36
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