Creates a new Transform object.
Restores the transformation matrix to the identity matrix.
void Rotate(
number
$theta
)
|
|
Adds a rotation operation.
Parameters:
|
number |
$theta: |
The angle of rotation. |
Performs the stored transformation on $poly. $cx = $y = -1 will set the centre of the Polygon as origin.
Parameters:
|
Polygon |
$poly: |
The Polygon to transform. |
|
int |
$cx: |
The X co-ordinate to act as origin. |
|
int |
$cy: |
The Y co-ordinate to act as origin. |
void Translate(
number
$x, number
$y
)
|
|
Adds a translation operation.
Parameters:
|
number |
$x: |
Translation along X axis. |
|
number |
$y: |
Translation along Y axis. |