Skip to content
Christopher Nikkel edited this page Dec 22, 2018 · 12 revisions

Line

Definition

type Line =
    {
        Point1: Point
        Point2: Point
    }

Description

Line is used to create a SVG line.

Functions

Function Signature Description
Line.create Point -> Point -> Line create a line from two Points
Line.toString Line -> string convert a Line to a string

Usage

Example

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"

Output

<line stroke="blue" stroke-width="3" fill="cyan" opacity="1" x1="5" y1="0" x2="60" y2="9"/>

Table of Contents

Getting Started

Fundamentals

Basic SVG Elements

Advanced Elements

Experimental

Clone this wiki locally
You can’t perform that action at this time.