Skip to content

Commit

Permalink
add opts.hs for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffreyrosenbluth committed Sep 22, 2015
1 parent e2994d2 commit ec39c40
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions examples/opts.hs
@@ -0,0 +1,19 @@
import qualified Data.Text as T
import qualified Lucid.Svg as LST
import Diagrams.Prelude
import Diagrams.Backend.SVG

svgOpt :: Num n => Options SVG V2 n
svgOpt = SVGOptions {
_size = mkSizeSpec $ V2 (Just 400) (Just 400),
_idPrefix = T.empty,
_svgDefinitions = Nothing,
_svgAttributes = [LST.preserveAspectRatio_ $ T.pack "xMinYMin"],
_generateDoctype = True
}

diagram :: Diagram B
diagram = circle 1 # fc orange # lw ultraThick # lc blue # frame 0.2

main :: IO ()
main = renderSVG' "opts.svg" svgOpt diagram

0 comments on commit ec39c40

Please sign in to comment.