UNPKG
art
Version:
latest (0.10.3)
0.10.3
0.10.2
0.10.1
0.10.0
0.9.2
0.9.0
0.0.0
Cross-browser Vector Graphics
sebmarkbage.github.io/art
sebmarkbage/art
art
/
shapes
/
ellipse.js
16 lines
(11 loc)
•
261 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
var
Shape
=
require
(
'./generic'
);
module
.
exports
=
Shape
(
function
(
width, height
){
this
.
width
= width;
this
.
height
= height;
var
rx = width /
2
, ry = height /
2
;
this
.
path
.
move
(
0
, ry) .
arc
(width,
0
, rx, ry) .
arc
(-width,
0
, rx, ry) .
close
(); });