Skip to content

Stroke the checkbox mark through the vector core - #87

Merged
ctate merged 3 commits into
mainfrom
fix/checkbox-mark-aa
Jul 10, 2026
Merged

ctate merged 3 commits into
mainfrom
fix/checkbox-mark-aa

Conversation

@ctate

@ctate ctate commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

Bug

The checkbox checkmark rendered chunky at small sizes — uneven stroke weight, stair-stepped edges, a mushy joint — while every built-in icon around it rendered clean.

Diagnosis

The mark was never an icon: it was two diagonal draw_line commands, and the line rasterizer's binary point-in-capsule test has no anti-aliasing at all. Every other draw_line in the product is axis-aligned (where the binary test is exact) — the checkbox was the only diagonal. All 50 built-in icons go through the vector core and were verified crisp via contact sheets; no icon change was needed.

Fix

emitCheckboxWidget emits the vee as one stroked polyline through the vector core — identical shape and vertices, width 2, round caps, a real round join at the vertex. The mark now rasterizes with the same anti-aliased coverage as the stroke icons, in both schemes, both theme packs, snapped and unsnapped.

Verification

  • New test pins the anti-aliased property itself (a stroke_path with partial-coverage pixels inside the fill) plus the render signature
  • Catalog signatures re-pinned from actual output after pixel review; 50-icon contact sheets confirm only the checkbox changed
  • Full suite, validate, smokes, examples battery, and render budgets green

- The check was two diagonal draw_line commands, and the line rasterizer's binary capsule test has no anti-aliasing, so the mark stair-stepped at every scale while the stroke icons around it rendered clean
- One stroked polyline with round caps and a round join now rasterizes the same shape with real coverage; a test pins the anti-aliased property so the mark can never regress to hard edges
@vercel

vercel Bot commented Jul 10, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
native-sdk Ready Ready Preview, Comment Jul 10, 2026 4:08am

…host

- Path elements now live in builder-owned storage instead of threadlocal frame scratch, so commands from separately emitted trees can never alias each other's geometry; charts and the spinner adopt the same lifetime
- The stroke cap rides the packet command, both wire encodings (v4), and the fingerprint, and the AppKit host applies it plus the reference renderer's round join when stroking paths
- Re-pin the components catalog signatures for the combined tree: the snap-default pins from main and the checkbox stroke pins from this branch both moved the same scenes
@ctate
ctate merged commit 33da710 into main Jul 10, 2026
21 checks passed

This branch was successfully deployed

1 active deployment
Preview — e73f1b01 Deployed Jul 10, 2026 by vercel[bot]
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