Repository navigation
test: pin that a color's alpha is not blended by drawRectangle - #70
Merged
Merged
Conversation
pygame.draw never blends, so an (r, g, b, a) fill paints opaquely on the display and overwrites the pixel alpha of a per-pixel-alpha surface. Pin both and document the caveat for drawRectangle and drawButton's box. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
Self-review rubric (anchored on the CI
Findings flagged for judgment (no change applied):
This review was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener). drafted by Claude on behalf of Daniel Stephenson |
dmccoystephenson
deleted the
test/pin-rectangle-color-alpha-not-blended
branch
November 8, 2026 06:20
2 of 3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Stage B (unit-test expansion) cycle with a matching documentation note. Current behavior is pinned; no production logic is changed.
(r, g, b, a)fill color is never blended bydrawRectangle(and therefore bydrawButton's box), becausepygame.drawwrites colors directly:ais (evena = 0);pygame.SRCALPHAsurface, the color's alpha replaces the pixels' own alpha instead of blending over them.test_draw_rectangle_paints_a_translucent_color_opaquely_on_the_display(parametrized overa = 0anda = 128) andtest_draw_rectangle_overwrites_the_alpha_of_a_per_pixel_alpha_surface.drawRectanglecoloranddrawButtoncolorBoxdocstrings, and in the README beside the color constants.drawText's handling of an alpha component was deliberately left out of scope: it goes throughFont.render, whose treatment of foreground alpha was not verified across the pygame versions CI installs, so pinning it here risked a version-dependent test.Test plan
python3 -m py_compile src/main/python/preponderous/graphik/graphik.pypytest— 151 passed (148 before + 3 new), pygame 2.1.2 locallyTestworkflow green across 3.9–3.13 (current pygame), confirming thepygame.drawbehavior holds on the newer versionDeferred issues
Every open issue was skipped this cycle because each is gated on a maintainer decision or on
.github/workflows/, which is excluded from autonomous change: #68 (whole-float font size: choice among three options), #61 (fractionaldrawButtonhit test: consumer-visible shift), #46, #39 and #34 (workflow files), #40 (namespace-package convention across sibling projects).No tracking issue — gap found during triage.
This PR description was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener).
🤖 Generated with Claude Code
drafted by Claude on behalf of Daniel Stephenson