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

Circle

Definition

type Circle =
    {
        Center: Point
        Radius: Length
    }

Description

Circle is used to create a SVG circle.

Functions

Function Signature Description
Circle.create Point -> Length -> Circle create a Ellipse with a specified Point for the center and a Length of the radius
Circle.toString Circle -> string convert a Circle to a string

Usage

Example

let center =  Point.ofInts (15, 15)
let radius = Length.ofInt 5

let style = Style.create (Name Colors.Cyan) (Name Colors.Blue) (Length.ofInt 3) 1.0 1.0

Circle.create center radius
  |> Element.createWithStyle style
  |> printf "%O"

Output

<circle stroke="blue" stroke-width="3" fill="cyan" opacity="1" r="5" cx="15" cy="15"/>

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.