pixie/fileformats/svg

  Source   Edit

Load SVG files.

Types

Svg = ref object
  width*, height*: int
  elements: seq[(Path, SvgProperties)]
  linearGradients: Table[string, LinearGradient]
  Source   Edit

Consts

svgSignature = "<svg"
  Source   Edit
xmlSignature = "<?xml"
  Source   Edit

Procs

proc newImage(svg: Svg): Image {....raises: [PixieError], tags: [RootEffect].}
Render SVG and return the image.   Source   Edit
proc parseSvg(data: string | XmlNode; width = 0; height = 0): Svg {.
    ...raises: [PixieError].}
Parse SVG XML. Defaults to the SVG's view box size.   Source   Edit