SvgDocument
A standalone .svg file read as a one-page document, so a viewer can open it the same way it opens a PDF or a comic.
The page is the SVG's own viewport, 1 px = 1 pt; a viewer scales to fit. Everything is drawn as vectors, so zooming stays sharp.
val doc = SvgDocument.open(bytes)
doc.pages.single().renderTo(canvas, ctm)Content copied to clipboard