Class Index | File Index

Classes


Class CubicCurve


Defined in: primitives.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
CubicCurve(startPoint, controlPoint1, controlPoint2, endPoint)
Creates an instance of a cubic curve.
Field Summary
Field Attributes Field Name and Description
 
The first controll Point
 
The second controll Point
 
The end Point
 
Object type used for JSON deserialization
 
The start Point
 
The Style of the quad
Method Summary
Method Attributes Method Name and Description
 
 
contains(x, y)
Inspired by java.awt.geom.CubicCurve2D
 
 
equals(anotherCubicCurve)
 
 
<static>  
CubicCurve.load(o)
Creates a {CubicCurve} out of JSON parsed object
 
near(x, y, radius)
TODO: algorithm not clear and maybe we can find the math formula to determine if we have an intersection
 
paint(context)
 
 
Render the SVG fragment for this primitive
 
transform(matrix)
Class Detail
CubicCurve(startPoint, controlPoint1, controlPoint2, endPoint)
Creates an instance of a cubic curve. A curved line determined by 2 normal points (startPoint and endPoint) and 2 control points (controlPoint1, controlPoint2)
Parameters:
{Point} startPoint
- starting point of the line
{Point} controlPoint1
- 1st control point of the line
{Point} controlPoint2
- 2nd control point of the line
{Point} endPoint
- the ending point of the line
See:
http://en.wikipedia.org/wiki/B%C3%A9zier_curve#Cubic_B.C3.A9zier_curves
Field Detail
controlPoint1
The first controll Point

controlPoint2
The second controll Point

endPoint
The end Point

oType
Object type used for JSON deserialization

startPoint
The start Point

style
The Style of the quad
Method Detail
clone()

contains(x, y)
Inspired by java.awt.geom.CubicCurve2D
Parameters:
x
y

deprecated_contains(x, y)
Parameters:
x
y

equals(anotherCubicCurve)
Parameters:
anotherCubicCurve

getBounds()

getPoints()

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

near(x, y, radius)
TODO: algorithm not clear and maybe we can find the math formula to determine if we have an intersection
Parameters:
x
y
radius
See:
http://rosettacode.org/wiki/Bitmap/B%C3%A9zier_curves/Cubic

paint(context)
Parameters:
context

toString()

toSVG()
Render the SVG fragment for this primitive
See:
http://www.w3.org/TR/SVG/paths.html#PathDataCubicBezierCommands

transform(matrix)
Parameters:
matrix

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