Module Diagram/svg

This module is undocumented. This is a list of its definitions.

diagramToSVG :: Resource -> <Proc> String

Renders a diagram as an SVG document and returns it as a string, at 96 dpi and with a margin of 5 percent. The resource may be the diagram itself or a composite that has one.

Rendering does not throw: if the resource does not resolve to a diagram, or the rendering fails, the returned string is an error message in the form <b>error</b> ... instead of an SVG document.

diagramToSVGdpi :: Resource -> Double -> <Proc> String

Renders a diagram as an SVG document at the given resolution in dots per inch. Otherwise the same as diagramToSVG, error reporting included.

diagramToSVGsize :: Resource -> Integer -> Integer -> <Proc> String

Renders a diagram as an SVG document scaled to the given width and height in pixels. Otherwise the same as diagramToSVG, error reporting included.