Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e2994d2
commit ec39c40
Showing
1 changed file
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |