User-reported 2026-05-10 "圆角元素的尖角阴影" — rounded cards / hero images had visibly square-cornered drop shadows poking out from under the rounded shape. Forensic root cause: applyShadowDirect at node-renderer.ts:447 was always drawing the shadow as a plain `canvas.drawRect(...)`, completely ignoring the node's cornerRadius. A frame with cornerRadius=24 + a subtle drop shadow would render the rounded body cleanly but stamp a sharp-cornered shadow rectangle just behind it, with the rectangle corners visible past the rounded outline. Fix: pass the node's cornerRadius into applyShadowDirect; when > 0 use `drawRRect` with `RRectXY(rect, cornerRadius+spread, ...)` so the shadow's rounding stays parallel to the node's rounding (the +spread correction keeps the visible curve aligned when spread expands / contracts the bounds). Ellipse / circle nodes (avatars, status dots) get cornerRadius = min(w,h)/2 from the call site so their shadows render as stadium / circle. Asymmetric-aspect ellipses get a stadium approximation rather than a true ellipse — accepted simplification, the common case is symmetric (avatar / dot). Path / line / polygon nodes have no cornerRadius and fall through with cr=0 — rectangular shadow stays correct for them. This is a renderer-layer fix that detector-only paths can't reach; ships in the same session as the typography / spacing detectors so the user sees end-to-end aesthetic improvement on the next rebuild. |
||
|---|---|---|
| .. | ||
| agent-native@22f20e42cd | ||
| pen-acp | ||
| pen-ai-skills | ||
| pen-core | ||
| pen-engine | ||
| pen-figma | ||
| pen-mcp | ||
| pen-react | ||
| pen-renderer | ||
| pen-sdk | ||
| pen-types | ||
| CLAUDE.md | ||