From 718d2b39c21273def03bcad47e7c7c20bacb0659 Mon Sep 17 00:00:00 2001 From: Jeroen Schweitzer Date: Sun, 28 Jun 2026 21:22:14 +0200 Subject: [PATCH] feat(svg): marker/arrowhead rendering for the drawing-card renderer (T-320) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Collect defs (refX/refY, orient=auto, markerUnits) and the path marker-start/mid/end refs in the builder, then paint them at the path endpoints rotated to the path tangent (orient=auto). The viewBox→viewport scale is approximated 1:1 (holds for d2's markers). d2 edges now render with arrowheads. Covered by dart test (builder) + a flutter-test pixel probe (the green arrowhead draws). image painting remains the last T-320 follow-on. Co-Authored-By: Claude Opus 4.8 (1M context) --- .pql/changelog/ticket_history/2026-06.sql | 35 ++++++++ .pql/changelog/tickets/2026-06.sql | 19 +++++ lib/src/svg/svg_document.dart | 44 +++++++++- lib/src/svg/svg_node.dart | 30 ++++++- lib/widgets/src/svg/svg_painter.dart | 97 +++++++++++++++++++++-- test/svg/svg_document_test.dart | 18 ++++- test/widgets/svg/svg_painter_test.dart | 19 +++++ 7 files changed, 248 insertions(+), 14 deletions(-) diff --git a/.pql/changelog/ticket_history/2026-06.sql b/.pql/changelog/ticket_history/2026-06.sql index 8167d909..295270ad 100644 --- a/.pql/changelog/ticket_history/2026-06.sql +++ b/.pql/changelog/ticket_history/2026-06.sql @@ -8108,3 +8108,38 @@ CSS DECISION — inline-normalize (option A): d2 emits a