-
Notifications
You must be signed in to change notification settings - Fork 8
Line
Christopher Nikkel edited this page Dec 22, 2018
·
12 revisions
type Line =
{
Point1: Point
Point2: Point
}
Line
is used to create a SVG line.
Function | Signature | Description |
---|---|---|
Line.create |
Point -> Point -> Line |
create a line from two Points |
Line.toString |
Line -> string |
convert a Line to a string |
let start = Point.ofInts (5, 0)
let finish = Point.ofInts (60, 9)
let style = Style.create (Name Colors.Cyan) (Name Colors.Blue) (Length.ofInt 3) 1.0 1.0
Line.create start finish
|> Element.createWithStyle style
|> printf "%O"
<line stroke="blue" stroke-width="3" fill="cyan" opacity="1" x1="5" y1="0" x2="60" y2="9"/>