Skip to content

6/7: Shapes & coordinate rendering improvements#13

Closed
Amnell wants to merge 12 commits into
pr/05-dom-scripting-currentcolorfrom
pr/06-shapes-and-coordinates
Closed

6/7: Shapes & coordinate rendering improvements#13
Amnell wants to merge 12 commits into
pr/05-dom-scripting-currentcolorfrom
pr/06-shapes-and-coordinates

Conversation

@Amnell
Copy link
Copy Markdown
Owner

@Amnell Amnell commented May 27, 2026

Summary

Improve shape and coordinate rendering with SVG spec compliance fixes and new W3C test coverage.

Changes

Shapes:

  • Add shapes-intro-02-f and improve SVG arc rendering parity
  • Fix SVGRect rendering: clamp rx/ry and use elliptical arcs (per SVG spec)
  • Implement shapes-rect-01-t, shapes-rect-03-t, shapes-rect-07-f W3C coverage

Coordinates & Viewport:

  • Increase test render scale
  • Fix coords-viewattr-01-b viewport layout and coverage
  • Implement coords-units-01-b and drop unimplemented suite
  • Implement coords-viewattr-02-b image preserveAspectRatio rendering

Reporting:

  • Fix test report artifact collisions across SVG versions
  • Improve HTML test report navigation and utilities
  • Add W3C test PNGs for static references

Merge order

⚠️ Merge these PRs in order: #8#9#10#11#12#13#14. After merging each PR, GitHub will automatically update the next PR's base to main.

Stack:

  1. Swift 6 prep & test modernization (1/7: Swift 6 prep & test modernization #8)
  2. Docs & tooling (2/7: Project docs, tooling & initial W3C coverage #9)
  3. Pattern/gradient paint servers (3/7: Implement pattern & gradient paint servers #10)
  4. Test reporting (4/7: HTML test report generation #11)
  5. DOM scripting & currentColor (5/7: DOM scripting engine & currentColor hardening #12)
  6. Shapes & coordinates ← this PR
  7. Structural elements & text

Amnell added 12 commits May 25, 2026 14:49
Per SVG spec, rx/ry must be clamped to width/2 and height/2.
Replace RoundedRectangle (circular arcs only) with CGMutablePath
addRoundedRect which uses true elliptical quarter-arc corners,
matching SVG rx/ry semantics. Fixes shapes-rect-06-f.
Decode embedded JPEG data URIs for <image> elements and apply preserveAspectRatio layout in SwiftUI image views. Add SVG 1.1 coords-viewattr-02-b test coverage, generated reference, CLI ref list, and coverage table update.
Add SVG 1.1 and 1.2 shapes-rect-01-t test cases, include them in reference generation lists, generate new .ref fixtures, and update coverage status.
Fix SVG Tiny 1.2 W3C harness URLs, add per-test copy-name button, show only selected suite/group tests by default, and persist left-menu focus across reloads.
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