reanimate-svg-0.13.0.1: SVG file loader and serializer
Safe HaskellNone
LanguageHaskell2010

Graphics.SvgTree

Description

Module providing basic input/output for the SVG document, for document building, please refer to Graphics.Svg.Types.

Synopsis

Saving/Loading functions

loadSvgFile :: FilePath -> IO (Maybe Document) Source #

Try to load an svg file on disc and parse it as a SVG Document.

parseSvgFile Source #

Arguments

:: FilePath

Source path/URL of the document, used to resolve relative links.

-> Text 
-> Maybe Document 

Parse an in-memory SVG file

xmlOfDocument :: Document -> Element Source #

Transform a SVG document to a XML node.

saveXmlFile :: FilePath -> Document -> IO () Source #

Save a svg Document to a file on disk.

Manipulation functions

cssApply :: [CssRule] -> Tree -> Tree Source #

Rewrite a SVG Tree using some CSS rules.

This action will propagate the definition of the css directly in each matched element.

cssRulesOfText :: Text -> [CssRule] Source #

Parse CSS text into rules.

Type definitions