Class Index | File Index

Classes


Class Polygon


Defined in: primitives.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Creates an instance of a Polygon
Field Summary
Field Attributes Field Name and Description
 
Serialization type
 
An {Array} of Points
 
The Style of the polygon
Method Summary
Method Attributes Method Name and Description
 
addPoint(point)
 
 
contains(x, y)
 
equals(anotherPolygon)
 
fill(context, color)
 
 
 
<static>  
Polygon.load(o)
Creates a {Polygon} out of JSON parsed object
 
near(x, y, radius)
 
paint(context)
 
 
Render the SVG fragment for this primitive
 
transform(matrix)
Class Detail
Polygon()
Creates an instance of a Polygon
Author: Alex Gheorghiu .
Field Detail
oType
Serialization type

points
An {Array} of Points

style
The Style of the polygon
Method Detail
addPoint(point)
Parameters:
point

clone()

contains(x, y)
Parameters:
x
y

equals(anotherPolygon)
Parameters:
anotherPolygon

fill(context, color)
Parameters:
context
color

{Array} getBounds()
Returns:
{Array} - returns [minX, minY, maxX, maxY] - bounds, where all points are in the bounds.

getPoints()

getPosition()

<static> {Polygon} Polygon.load(o)
Creates a {Polygon} out of JSON parsed object
Author: Alex Gheorghiu .
Parameters:
{JSONObject} o
- the JSON parsed object
Returns:
{Polygon} a newly constructed Polygon

near(x, y, radius)
Parameters:
x
y
radius

paint(context)
Parameters:
context

toString()

toSVG()
Render the SVG fragment for this primitive

transform(matrix)
Parameters:
matrix

Documentation generated by JsDoc Toolkit 2.4.0 on Thu Jun 09 2011 12:47:26 GMT+0300 (EEST)