wumpus-core-0.42.1: Pure Haskell PostScript and SVG generation.

Stabilityhighly unstable
MaintainerStephen Tetley <stephen.tetley@gmail.com>




Output SVG.

This is complicated by two differences with PostScript.

  1. The coordinate space of SVG is origin top-left, for PostScript it is origin bottom-left.
  2. Clipping in SVG uses tagging. A clipPath element is declared and named, subsequent elements within the clipping area reference it via the clip-path attribute - clip-path="url(#clip_path_tag)".


Output SVG

writeSVG :: (Real u, Floating u, PSUnit u) => FilePath -> Picture u -> IO ()Source

Output a picture to a SVG file.

writeSVG_defs :: (Real u, Floating u, PSUnit u) => FilePath -> String -> Picture u -> IO ()Source

writeSVG_defs : file_name -> defs -> picture -> IO ()

Output a picture to a SVG file the supplied defs are written into the defs section of SVG file verbatim.