Skip to content

feat: FillRoundRect + StrokeRoundRect (anti-aliased rounded corners) - #2

Merged
tannevaled merged 1 commit into
mainfrom
round-rect-primitives
Jul 6, 2026
Merged

feat: FillRoundRect + StrokeRoundRect (anti-aliased rounded corners)#2
tannevaled merged 1 commit into
mainfrom
round-rect-primitives

Conversation

@tannevaled

Copy link
Copy Markdown
Contributor

Adds rounded-rectangle primitives to the Painter interface so widgets can render the macOS/WhiteSur pill + card shapes instead of hard rectangles.

  • PixelPainter anti-aliases the corner edge (fractional-alpha pixels composited through PutPixel).
  • CellPainter can't round a cell grid, so it falls back to the square FillRect/StrokeRect.
  • radius is clamped to half the smaller side; radius <= 0 degrades to the square primitive.

100% coverage; GOOS=js GOARCH=wasm builds.

🤖 Generated with Claude Code

Add rounded-rectangle primitives to the Painter interface so widgets can render
the macOS/WhiteSur pill + card shapes instead of hard rectangles. PixelPainter
anti-aliases the corner edge (fractional-alpha pixels composited via PutPixel);
CellPainter can't round a cell grid, so it falls back to the square
FillRect/StrokeRect. radius is clamped to half the smaller side, and radius<=0
degrades to the square primitive.

100% coverage.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@tannevaled
tannevaled merged commit 1373a47 into main Jul 6, 2026
1 check passed
@tannevaled
tannevaled deleted the round-rect-primitives branch July 6, 2026 18:30
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