Last active
August 29, 2015 14:03
-
-
Save kowey/469b312c4db3cb6772d7 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" | |
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> | |
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="400.0" height="240.0" font-size="1" viewBox="0 0 400 240" stroke="rgb(0,0,0)" stroke-opacity="1"><g><g fill="rgb(0,0,0)" fill-opacity="0.0"><g stroke="rgb(0,0,0)" stroke-opacity="1.0" stroke-width="1.2393546707863734" stroke-linecap="butt" stroke-linejoin="miter" font-size="1.0em" stroke-miterlimit="10.0"><g fill="rgb(0,0,0)" fill-opacity="1.0" font-size="154.91933384829667em"><g fill="rgb(0,0,0)" fill-opacity="1.0"><text transform="matrix(1.0,0.0,0.0,1.0,400.0,120.0)" dominant-baseline="middle" text-anchor="middle" stroke="none">Dog</text></g></g><path d="M 400.0,160.0 v -79.99999999999999 c 0.0,-44.18277998646348 -35.81722001353651,-80.0 -79.99999999999999 -80.0h -240.0 c -44.18277998646348,-2.705415004392712e-15 -80.0,35.81722001353651 -80.0 79.99999999999999v 79.99999999999999 c -5.410830008785424e-15,44.18277998646348 35.81722001353651,80.0 79.99999999999999 80.00000000000003h 240.00000000000003 c 44.18277998646348,8.116245013178136e-15 80.0,-35.817220013536506 80.0 -79.99999999999999Z" /></g></g></g></svg> |
This file contains hidden or 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
{-# 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