openpencil/tests/e2e/canvas
Danila Poyarkov d2e380ea9d
fix(core): draw gradient and image strokes as the paint they are (#868)
* fix(core): draw gradient and image strokes as the paint they are

A stroke carried the paint vocabulary already, but nothing read it: the
.fig reader sent every stroke paint through resolvedPaintColor, which
returns black for a gradient or image, the renderer set a flat color on
strokePaint, and the writer emitted a SOLID paint.

Strokes now go through the same conversion fills do in both directions,
and applyGradientFill and applyImageFill take the target Paint so a
stroke reuses the fill shader path instead of growing a second one.
forVisibleStrokes is the single place every stroke draw passes through,
so the shader is set and cleared there rather than threaded through each
draw helper.

Closes #797 for rendering and .fig; authoring a gradient stroke from the
stroke panel is still to come.

* feat(app): author gradient and image strokes from the stroke panel

StrokeSection opened a solid-only colour picker and synthesised a fake
fill for the swatch, so a stroke could never be anything but one flat
colour. It now opens FillPicker like the fill panel does, and
applyStrokePaint keeps the stroke's weight, align, cap, join and dashes
across a paint change.

Completes #797.

* fix(core): let a gradient stroke reach vector outlines and arrowheads

A vector stroke draws its outline as a filled shape with fillPaint, a
dashed one strokes the path, and arrowheads are filled shapes of their
own; each cleared the shader first, so a gradient or image stroke on a
vector drew black. The stroke pass now configures both paints and owns
clearing them, and those helpers keep what it set.

Resolve each gradient stop against the stroke's own colour binding
rather than the stop's position, which looked up another stroke's.

Reported in review of #868.

* fix(core): release the shaders a paint no longer owns

Every gradient and image shader was handed to a paint and then leaked:
the paint takes its own reference, so the caller's handle has to go or
WASM memory grows with each redraw. Only the diamond branch did this.

A gradient stroke now configures two paints, which doubled the leak.

Reported in review of #868.

* test(render): model a shader handle the caller deletes

The pattern shader double returned a plain string, so deleting the
handle the paint no longer owns threw instead of passing.
2026-10-04 13:25:45 +00:00
..
arrow-caps-visual.spec.ts-snapshots test(canvas): align visual oracles with ruler-free fixtures 2026-09-16 03:45:34 +03:00
boolean-visual.spec.ts-snapshots ci: shard unit tests by owner and cut the quick suite from 100 s to 13 s (#715) 2026-09-17 10:18:16 +03:00
color-space.webkit.spec.ts-snapshots fix: convert document colour profiles, keep text edits live, and fix .fig exports (#716) 2026-09-18 00:43:10 +03:00
corner-smoothing-visual.spec.ts-snapshots fix(editor): commit vector drags on pointer release (#586) 2026-08-24 16:02:27 +03:00
cursor-labels.spec.ts-snapshots fix: zoom in place, shape cursor names, and align context menu items (#818) 2026-10-01 21:34:36 +04:00
demo-workspace.spec.ts-snapshots feat: check designs live with a Lint panel, canvas markers, and fixes (#804) 2026-10-04 10:08:39 +00:00
dense-text-preview.spec.ts-snapshots perf(text): preserve coverage across paragraph eviction 2026-09-15 16:32:07 +03:00
distance-measurement-edge-cases.spec.ts-snapshots fix(text): finalize font readiness and label shaping (#593) 2026-08-30 14:33:32 +03:00
distance-measurement.spec.ts-snapshots fix(text): finalize font readiness and label shaping (#593) 2026-08-30 14:33:32 +03:00
document-loading.spec.ts-snapshots feat: refresh branding with generated platform icons (#707) 2026-09-16 11:54:07 +03:00
drop-files.spec.ts-snapshots fix(editor): commit vector drags on pointer release (#586) 2026-08-24 16:02:27 +03:00
fill-modes-visual.spec.ts-snapshots ci: shard unit tests by owner and cut the quick suite from 100 s to 13 s (#715) 2026-09-17 10:18:16 +03:00
frame-overlays.spec.ts-snapshots fix(canvas): keep labels readable and refine section badges 2026-09-15 19:54:04 +03:00
instance-scale-visual.spec.ts-snapshots feat(fig): occurrence-scoped instance interpretation as the single .fig reader 2026-10-01 11:20:27 +04:00
instance-sizing.spec.ts-snapshots test: replace legacy demo snapshots with current coverage 2026-09-14 01:20:56 +03:00
label-anatomy.spec.ts-snapshots perf(canvas): reuse labels with shared font fallback 2026-09-15 23:08:53 +03:00
labels fix(canvas): include component-set members in label catalog 2026-09-16 14:13:34 +03:00
live-editing.spec.ts-snapshots feat(editor): checkpoint live interaction improvements 2026-09-15 11:36:17 +03:00
nested-transform-interaction.spec.ts-snapshots fix(canvas): keep labels readable and refine section badges 2026-09-15 19:54:04 +03:00
occurrence-text-visual.spec.ts-snapshots feat(fig): occurrence-scoped instance interpretation as the single .fig reader 2026-10-01 11:20:27 +04:00
pattern-mask-visual.spec.ts-snapshots ci: shard unit tests by owner and cut the quick suite from 100 s to 13 s (#715) 2026-09-17 10:18:16 +03:00
pen-variables.spec.ts-snapshots fix(pen): resolve ordinary variable references (#622) 2026-09-06 23:50:03 +03:00
presence-cursors.spec.ts-snapshots feat: show AI agents on the canvas and to collaborators (#803) 2026-10-03 14:01:36 +04:00
retained-grid.spec.ts-snapshots feat(editor): checkpoint live interaction improvements 2026-09-15 11:36:17 +03:00
saved-glyph-visual.spec.ts-snapshots feat(fig): occurrence-scoped instance interpretation as the single .fig reader 2026-10-01 11:20:27 +04:00
scene-picture-freshness.spec.ts-snapshots fix(editor): close preview and history lifecycle gaps 2026-09-16 03:36:44 +03:00
stroke-geometry-visual.spec.ts-snapshots fix(editor): commit vector drags on pointer release (#586) 2026-08-24 16:02:27 +03:00
stroke-paint-visual.spec.ts-snapshots fix(core): draw gradient and image strokes as the paint they are (#868) 2026-10-04 13:25:45 +00:00
text refactor!: move shared primitives below dom-css and core (#771) 2026-09-26 11:39:11 +04:00
tiled-large-blur-visual.spec.ts-snapshots test(canvas): align visual oracles with ruler-free fixtures 2026-09-16 03:45:34 +03:00
typography-depth-visual.spec.ts-snapshots fix(editor): commit vector drags on pointer release (#586) 2026-08-24 16:02:27 +03:00
vector feat(scene-graph)!: make a stroke a paint (#864) 2026-10-04 13:38:05 +04:00
arrow-caps-visual.spec.ts fix(core): draw gradient and image strokes as the paint they are (#868) 2026-10-04 13:25:45 +00:00
boolean-visual.spec.ts feat(scene-graph)!: make a stroke a paint (#864) 2026-10-04 13:38:05 +04:00
color-space.spec.ts fix(canvas): preserve paint geometry and color fidelity 2026-09-16 02:57:56 +03:00
color-space.webkit.spec.ts feat(updater): show download progress while installing an update 2026-09-25 23:15:14 +04:00
corner-smoothing-visual.spec.ts fix(editor): commit vector drags on pointer release (#586) 2026-08-24 16:02:27 +03:00
cursor-labels.spec.ts feat: show AI agents on the canvas and to collaborators (#803) 2026-10-03 14:01:36 +04:00
demo-workspace.spec.ts feat(demo): rebuild the first page as a component library with staged loading (#717) 2026-09-18 08:18:21 +03:00
dense-text-preview.spec.ts perf(text): preserve coverage across paragraph eviction 2026-09-15 16:32:07 +03:00
distance-measurement-edge-cases.spec.ts feat(scene-graph)!: make a stroke a paint (#864) 2026-10-04 13:38:05 +04:00
distance-measurement.spec.ts feat(canvas): measure distances between layers (#515) 2026-08-14 18:18:55 +03:00
document-loading.spec.ts feat: refresh branding with generated platform icons (#707) 2026-09-16 11:54:07 +03:00
drop-files.spec.ts fix(editor): commit vector drags on pointer release (#586) 2026-08-24 16:02:27 +03:00
fill-modes-visual.spec.ts feat(scene-graph)!: make a stroke a paint (#864) 2026-10-04 13:38:05 +04:00
frame-creation-preview.spec.ts feat(editor): checkpoint live interaction improvements 2026-09-15 11:36:17 +03:00
frame-overlays.spec.ts fix(renderer): rasterize settled scenes at viewport origin 2026-09-15 13:25:43 +03:00
instance-scale-visual.spec.ts feat(fig): occurrence-scoped instance interpretation as the single .fig reader 2026-10-01 11:20:27 +04:00
instance-sizing.spec.ts fix: preserve authored instance sizing through synchronization 2026-09-14 00:24:52 +03:00
label-anatomy.spec.ts feat(scene-graph)!: make a stroke a paint (#864) 2026-10-04 13:38:05 +04:00
live-editing.spec.ts feat(editor): checkpoint live interaction improvements 2026-09-15 11:36:17 +03:00
manipulation.spec.ts feat(editor): add configurable snapping and guides 2026-08-18 19:11:48 +03:00
nested-transform-interaction.spec.ts feat(editor): checkpoint live interaction improvements 2026-09-15 11:36:17 +03:00
occurrence-text-visual.spec.ts feat(fig): occurrence-scoped instance interpretation as the single .fig reader 2026-10-01 11:20:27 +04:00
painted-text.spec.ts fix(canvas): preserve paint geometry and color fidelity 2026-09-16 02:57:56 +03:00
pattern-mask-visual.spec.ts feat(scene-graph)!: make a stroke a paint (#864) 2026-10-04 13:38:05 +04:00
pen-layout.spec.ts fix(pen): honor layout and sizing defaults (#652) 2026-09-10 17:02:56 +03:00
pen-variables.spec.ts fix(pen): resolve ordinary variable references (#622) 2026-09-06 23:50:03 +03:00
presence-cursors.spec.ts feat: show AI agents on the canvas and to collaborators (#803) 2026-10-03 14:01:36 +04:00
retained-grid.spec.ts feat(editor): checkpoint live interaction improvements 2026-09-15 11:36:17 +03:00
retained-parity.spec.ts fix(renderer): rasterize settled scenes at viewport origin 2026-09-15 13:25:43 +03:00
ruler-visibility.spec.ts fix: honor ruler visibility on the overlay canvas 2026-09-14 01:12:26 +03:00
saved-glyph-visual.spec.ts feat(fig): occurrence-scoped instance interpretation as the single .fig reader 2026-10-01 11:20:27 +04:00
scene-picture-freshness.spec.ts fix(canvas): discard stale zoom fallback pictures 2026-09-15 17:40:34 +03:00
split-views.spec.ts feat(editor): model split canvas panes (#519) 2026-08-15 10:31:52 +03:00
stroke-geometry-visual.spec.ts feat(scene-graph)!: make a stroke a paint (#864) 2026-10-04 13:38:05 +04:00
stroke-paint-visual.spec.ts fix(core): draw gradient and image strokes as the paint they are (#868) 2026-10-04 13:25:45 +00:00
tiled-large-blur-visual.spec.ts test(canvas): align visual oracles with ruler-free fixtures 2026-09-16 03:45:34 +03:00
tiled-property-preview.spec.ts feat(editor): checkpoint live interaction improvements 2026-09-15 11:36:17 +03:00
typography-depth-visual.spec.ts perf(text): preserve coverage across paragraph eviction 2026-09-15 16:32:07 +03:00