Skip to content

Instantly share code, notes, and snippets.

@jovaneyck
Created February 20, 2020 15:52
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 jovaneyck/a40cb5849a1e72099e606320942bd700 to your computer and use it in GitHub Desktop.
Save jovaneyck/a40cb5849a1e72099e606320942bd700 to your computer and use it in GitHub Desktop.
#r @"C:\Code\SharpVG\SharpVG\bin\Debug\netstandard2.1\SharpVG.dll"
#r @"C:\NugetLocal\netstandard\build\net461\lib\netstandard.dll"
open SharpVG
let black = Color.ofName Black
let opaque = 1.0
let style = Style.create black black Length.one opaque opaque
let lineAt p1 p2 = Line.create (Point.ofInts p1) (Point.ofInts p2) |> Element.create |> Element.withStyle style
let shapesSvg =
[lineAt (10,10) (10,20)
lineAt (10,10) (20,10)
lineAt (10,20) (20,20)
lineAt (20,10) (20,20)
]
|> Svg.ofSeq
System.IO.File.WriteAllText( @"c:\temp\out.html", (@"<meta http-equiv=""refresh"" content=""0.5"" >"+Svg.toString shapesSvg))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment