svg: SVG Rendering for Racket
Jens Axel Søgaard <jensaxel@soegaard.net>
Note: The parsers library and documentation were written with the help of Codex.
| (require svg/svg) | package: svg |
svg/svg turns SVG files or strings into Racket bitmap% images or picts.
The svg/svg Racket library allows you to read SVG documents and then draw them with racket/draw. The library supports many common static SVG features, including shapes, paths, colors, gradients, patterns, clipping, masks, text, images, CSS styles, and several filters. It does not try to run animations or scripts; it renders one still image.
The renderer covers most of static SVG 1.1 and SVG 2 —
Rendering is built directly on racket/draw’s dc<%> rather than through an intermediate representation.
The main omissions are animations, scripting, and interactivity; this is a static, single-frame renderer. Other gaps are listed in Scope and Known Limitations at the end of this document.