Class Index | File Index

Classes


Class Point2d

represents points in 2d xy plane
Defined in: raphaeltools.src.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Point2d(x, y)
2d xy plane point implementation
Field Summary
Field Attributes Field Name and Description
 
array of copies of itself
 
horizontal and verical shifts of copies from receiver
 
x
x coordinate
 
y
y coordinate
Method Summary
Method Attributes Method Name and Description
 
copy(shifts)
Copy receiver to given positions
<static>  
Point2d.create(x, y)
Creates new Point2d object, for parameters meaning see Point2d
 
setX(x)
Set new x coordinate to receiver
 
setXY(x, y)
Sets new position to receiver
 
setY(y)
Set new y coordinate to receiver
 
String representation
 
translate(dx, dy)
Change position of receiver by given values
 
Change horizontal position of receiver by given values
 
Change vertical position of receiver by given values
 
Update receiver (change positions of stored copies so as stored shifts between receiver and its copies remain constant
Class Detail
Point2d(x, y)
2d xy plane point implementation
Parameters:
{float} x
x coordinate of point
{float} y
y coordinate of point
Field Detail
{[Points2d]} copies
array of copies of itself

{[[float|float]]} copiesShifts
horizontal and verical shifts of copies from receiver

{float} x
x coordinate

{float} y
y coordinate
Method Detail
copy(shifts)
Copy receiver to given positions
n = Point2d(100,150);
shifts=[[100,200],[200,200],[100,300],[200,300]]
Parameters:
{[[float|float]]} shifts
vertical and horizontal shifts of copied points

<static> {Point2d} Point2d.create(x, y)
Creates new Point2d object, for parameters meaning see Point2d
Parameters:
x
y
Returns:
{Point2d} new Point2d object

setX(x)
Set new x coordinate to receiver
Parameters:
x
x coordinate of new position

setXY(x, y)
Sets new position to receiver
Parameters:
{float} x
x coordinate of new position
{float} y
y coordinate of new position

setY(y)
Set new y coordinate to receiver
Parameters:
y
y coordinate of new position

{String} toString()
String representation
Returns:
{String} string representation

translate(dx, dy)
Change position of receiver by given values
Parameters:
{float} dx
length of translation in x direction
{float} dy
length of translation in y direction

translateX(dx)
Change horizontal position of receiver by given values
Parameters:
{float} dx
length of translation in x direction

translateY(dy)
Change vertical position of receiver by given values
Parameters:
{float} dy
length of translation in x direction

update()
Update receiver (change positions of stored copies so as stored shifts between receiver and its copies remain constant

Documentation generated by JsDoc Toolkit 2.4.0 on Wed Dec 12 2012 09:22:03 GMT+0100 (CET)