Skip to content

Instantly share code, notes, and snippets.

@kowey
Last active August 29, 2015 14:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kowey/469b312c4db3cb6772d7 to your computer and use it in GitHub Desktop.
Save kowey/469b312c4db3cb6772d7 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
{-# LANGUAGE NoMonomorphismRestriction #-}
import Diagrams.Prelude
import Diagrams.TwoD.Text
import Diagrams.Backend.SVG.CmdLine
main = mainWith $ d2 ||| (label "Dog" # translateY 1)
label :: String -> Diagram B R2
label l = (text l # fontSizeL 1) <> strutX 2 <> strutY 1
d2 :: Diagram B R2
d2 = roundedRect 5 3 0.5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment