Skip to content

Ellipse

Christopher Nikkel edited this page Dec 22, 2018 · 9 revisions

Ellipse

Definition

type Ellipse =
    {
        Center: Point
        Radius: Point
    }

Description

Ellipse is used to create a SVG ellipse.

Functions

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

Usage

Example

let center = Point.ofInts (55, 45)
let radius = Point.ofInts (5, 1)

let style = Style.create (Name Colors.Red) (Name Colors.Green) (Length.ofInt 3) 1.0 1.0

Ellipse.create center radius
  |> Element.ofEllipseWithStyle style
  |> printf "%O"

Output

<ellipse stroke="green" stroke-width="3" fill="red" opacity="1" cx="55" cy="45" rx="5" ry="1"/>

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.