JSignage:Ellipse

From SpinetiX Support Wiki

Jump to: navigation, search

.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:

  • 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

Ellipse1.png
// draw a blue ellipse and add it to the document
$.ellipse( { cx: 640, cy: 360, rx: 400, ry: 300, fill:'blue' }).addTo('svg');


Ellipse2.png
// 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');


This page was last modified on 20 August 2014, at 11:52.