Copyright | (c) 2015 Jeffrey Rosenbluth |
---|---|
License | BSD-style (see LICENSE) |
Maintainer | jeffrey.rosenbluth@gmail.com |
Safe Haskell | None |
Language | Haskell2010 |
svg-builder Core types and functions.
- data Attribute
- data Element
- class ToElement a where
- class Term result where
- makeAttribute :: Text -> Text -> Attribute
- makeElement :: Text -> Element -> Element
- makeElementNoEnd :: Text -> Element
- makeElementDoctype :: Text -> Element
- with :: Element -> [Attribute] -> Element
- renderBS :: Element -> ByteString
- renderToFile :: FilePath -> Element -> IO ()
- renderText :: Element -> Text
Types
Attribute name value.
Type of an SVG element.
class Term result where Source
Used to make specific SVG element builders.
Combinators
makeElement :: Text -> Element -> Element Source
Make an SVG element builder
makeElementNoEnd :: Text -> Element Source
Make an SVG element with no end tag, contains only attributes.
makeElementDoctype :: Text -> Element Source
Make an SVG doctype element builder.
Rendering
renderBS :: Element -> ByteString Source
Render a Element
to lazy bytestring.
renderText :: Element -> Text Source
Reder an Element
to lazy text.