Class Index | File Index

Classes


Class Path


Defined in: primitives.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Path()
A path contains a number of elements (like shape) but they are drawn as one, i.e.
Field Summary
Field Attributes Field Name and Description
 
Object type used for JSON deserialization
 
An {Array} that will store all the basic primitives: Points, Lines, CubicCurves, etc that make the path
 
The Style used for drawing
Method Summary
Method Attributes Method Name and Description
 
addPrimitive(primitive)
 
 
contains(x, y)
 
equals(anotherPath)
 
 
<static>  
Path.load(o)
Creates a new {Path} out of JSON parsed object
 
near(x, y, radius)
 
paint(context)
 
Export this path to SVG
 
transform(matrix)
Class Detail
Path()
A path contains a number of elements (like shape) but they are drawn as one, i.e.
begin path
 loop to draw shapes
     draw shape
 close loop
close path
Field Detail
oType
Object type used for JSON deserialization

primitives
An {Array} that will store all the basic primitives: Points, Lines, CubicCurves, etc that make the path

style
The Style used for drawing
Method Detail
addPrimitive(primitive)
Parameters:
primitive

clone()

contains(x, y)
Parameters:
x
y

equals(anotherPath)
Parameters:
anotherPath

getBounds()

getPoints()

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

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

paint(context)
Parameters:
context

toSVG()
Export this path to SVG
<path d="M50,50
       A30,30 0 0,1 35,20
       L100,100
       M110,110
       L100,0"
    style="stroke:#660000; fill:none;"/>
See:
http://tutorials.jenkov.com/svg/path-element.html

transform(matrix)
Parameters:
matrix

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