JSignage:Ellipse
From SpinetiX Support Wiki
.ellipse()
.ellipse( attributes );
Returns: jSignage Object
Description
Draws an ellipse shape that can be filled and can have an outline. See the ellipse element in the SVG specification for reference.
Parameters
-
attributes
- Type: Plain Object.
- Contains the shape attributes.
Attributes
The following attributes can be specified:
-
fill
,stroke
etc.- Fill and stroke attributes (common to all shapes).
-
cx
,cy
- Type: Number. Default: 0.
- Specifies the x and y coordinates of the center of the ellipse.
-
rx
,ry
- Type: Number. Default: 0.
- Specifies the x-radius, respectively the y-radius, of the ellipse.
Examples
// draw a blue ellipse and add it to the document
$.ellipse( { cx: 640, cy: 360, rx: 400, ry: 300, fill:'blue' }).addTo('svg');
// draw a transparent ellipse with a red outline and add it to the document
$.ellipse( { cx: 640, cy: 360, rx: 400, ry: 200, fill:'none', stroke:'red', strokeWidth: '20'
}).addTo('svg');