ludo.svg.Circle

ludo.svg.


new ludo.svg.Circle(coordinates, config)

Class for circle tags. It extends canvas.Node by adding setter and getter methods
for radius, center x and center y.

Parameters:
Name Type Description
coordinates Object
config canvas.NodeConfig
Source:
Example
var circle = new ludo.svg.Circle(
 		{ cx:100, cy:100, r:200 },
	 	{ paint:paintObject }
 	 );

Extends

  • canvas.Node

Methods


getCy() → {String|Number}

Return current center Y

Source:
Returns:

cy

Type
String | Number

getPosition()() → {Object}

Return position on canvas

Source:
Returns:

x and y

Type
Object

getRadius() → {String|Number}

Return curent radius

Source:
Returns:

radius

Type
String | Number

getSize() → {Object}

Returns diameter x diameter

Source:
Returns:
Type
Object

getX() → {String|Number}

Return current center X

Source:
Returns:

cx

Type
String | Number

setCx(x)

Set new center X

Parameters:
Name Type Description
x Number
Source:

setCy(y)

Set new center Y

Parameters:
Name Type Description
y Number
Source:

setRadius(radius)

Set new radius

Parameters:
Name Type Description
radius Number
Source: