openpencil/packages
Fini b49060d59f fix(renderer): drop-shadow follows cornerRadius / ellipse outline
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.
2026-05-10 22:53:58 +08:00
..
agent-native@22f20e42cd Merge branch 'v0.8.0' of github.com:ZSeven-W/openpencil into v0.8.0 2026-05-10 21:37:11 +08:00
pen-acp Merge origin/v0.8.0 into feat/rust-ification 2026-05-03 21:00:00 +08:00
pen-ai-skills Merge branch 'v0.8.0' of github.com:ZSeven-W/openpencil into v0.8.0 2026-05-10 21:37:11 +08:00
pen-core fix(ai): clean card-image corners + strip wrapper stroke/cornerRadius with fill 2026-05-09 21:42:00 +08:00
pen-engine Merge origin/v0.8.0 into feat/rust-ification 2026-05-03 21:00:00 +08:00
pen-figma Merge origin/v0.8.0 into feat/rust-ification 2026-05-03 21:00:00 +08:00
pen-mcp Merge branch 'v0.8.0' of github.com:ZSeven-W/openpencil into v0.8.0 2026-05-10 21:37:11 +08:00
pen-react Merge origin/v0.8.0 into feat/rust-ification 2026-05-03 21:00:00 +08:00
pen-renderer fix(renderer): drop-shadow follows cornerRadius / ellipse outline 2026-05-10 22:53:58 +08:00
pen-sdk Merge origin/v0.8.0 into feat/rust-ification 2026-05-03 21:00:00 +08:00
pen-types Merge origin/v0.8.0 into feat/rust-ification 2026-05-03 21:00:00 +08:00
CLAUDE.md V0.7.0 (#95) 2026-04-11 23:25:13 +08:00