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

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

Wumpus.Core.OutputSVG

Contents

Description

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)".

Synopsis

Output SVG

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

Output a picture to a SVG file.

Generally an encoder should always support the principal encoders for the fonts used (e.g. Latin1) and the encoder for the Symbol font, as characters from the Symbol font may be used as decorations for plot marks, etc.

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

Version of writeSVG - using Latin1 and Symbol font encoders.

Generally an encoder should always support the principal encoders for the fonts used (e.g. Latin1) and the encoder for the Symbol font, as characters from the Symbol font may be used as decorations for plot marks, etc.