Class Index | File Index

Classes


Class Line


Defined in: primitives.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Line(startPoint, endPoint)
Creates an instance of a Line
Field Summary
Field Attributes Field Name and Description
 
Ending Point of the line
 
Serialization type
 
Starting Point of the line
 
The Style of the line
Method Summary
Method Attributes Method Name and Description
 
 
contains(x, y)
Tests to see if a point belongs to this line (not as infinite line but more like a segment) Algorithm: Compute line's equation and see if (x, y) verifies it.
 
equals(anotherLine)
 
Get bounds for this line
 
we need to create a new array each time, or we will affect the actual shape
<static>  
Line.load(o)
Creates a {Line} out of JSON parsed object
 
near(x, y, radius)
 
paint(context)
 
String representation
 
Render the SVG fragment for this primitive
 
transform(matrix)
Class Detail
Line(startPoint, endPoint)
Creates an instance of a Line
Author: Alex Gheorghiu .
Parameters:
{Point} startPoint
- starting point of the line
{Point} endPoint
- the ending point of the line
Field Detail
endPoint
Ending Point of the line

oType
Serialization type

startPoint
Starting Point of the line

style
The Style of the line
Method Detail
clone()

contains(x, y)
Tests to see if a point belongs to this line (not as infinite line but more like a segment) Algorithm: Compute line's equation and see if (x, y) verifies it.
Author: Alex Gheorghiu .
Parameters:
{Number} x
- the X coordinates
{Number} y
- the Y coordinates

equals(anotherLine)
Parameters:
anotherLine

getBounds()
Get bounds for this line
Author: Alex Gheorghiu .

getPoints()
we need to create a new array each time, or we will affect the actual shape

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

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

paint(context)
Parameters:
context

toString()
String representation

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)