Created
February 20, 2020 15:52
-
-
Save jovaneyck/a40cb5849a1e72099e606320942bd700 to your computer and use it in GitHub Desktop.
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
#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