-
Notifications
You must be signed in to change notification settings - Fork 8
Ellipse
Christopher Nikkel edited this page Dec 22, 2018
·
9 revisions
type Ellipse =
{
Center: Point
Radius: Point
}
Ellipse
is used to create a SVG ellipse.
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 |
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"
<ellipse stroke="green" stroke-width="3" fill="red" opacity="1" cx="55" cy="45" rx="5" ry="1"/>