Implement SVG basics: svg, rect, circle, ellipse, line, path, text, g
New `svg` crate with:
- SVG path data parser (M, L, H, V, C, S, Q, T, A, Z and relative variants)
- 2D affine transform parsing (translate, rotate, scale, matrix, skewX/Y)
- Scanline rasterizer with even-odd fill and stroke expansion
- Shape-to-path converters (rect, circle, ellipse, rounded rect via cubic arcs)
- SVG color parsing (named colors, #hex, rgb())
- viewBox coordinate mapping
- Presentation attributes: fill, stroke, stroke-width, opacity, transform
- SVG text rendering via the text crate's glyph rasterizer
Integration:
- HTML parser: SVG foreign content mode with namespace tracking
- Style resolver: skip children of SVG root elements (replaced element)
- Browser: rasterize SVG elements to RGBA images for layout/render pipeline
- UA stylesheet: svg { display: block }
35 new tests covering path parsing, transforms, shape rendering, viewBox
scaling, color parsing, group transforms, and HTML-SVG integration.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>