reanimate-svg-0.10.2.0: SVG file loader and serializer

Safe HaskellNone
LanguageHaskell2010

Graphics.SvgTree

Contents

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.

-> ByteString 
-> 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 on 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