svg-builder/examples/path.hs

23 lines
429 B
Haskell
Raw Normal View History

2016-02-15 09:41:04 -05:00
{-# LANGUAGE OverloadedStrings #-}
import Graphics.Svg
import Data.Monoid
import Data.Text.Lazy as T
svg :: Element -> Element
svg content =
doctype
<> with (svg11_ content) [Width_ <<- "325", Height_ <<- "325"]
contents :: Element
contents =
path_
[ D_ <<- (mA 10 80 <> qA 52.5 10 95 80 <> tA 180 80 <> z)
, Stroke_ <<- "blue"
, Fill_ <<- "orange"
]
main :: IO ()
main = do
print $ svg contents