phpDocumentor Painter
[ class tree: Painter ] [ index: Painter ] [ all elements ]

Class: Transform

Source Location: /painter.php

Class Transform

Class Overview

Encapsulates transformations for Polygon objects.

Located in /painter.php [line 487]



		
		
		
		

Methods

[ Top ]
Method Summary
Transform   Transform()   Creates a new Transform object.
void   Clear()   Restores the transformation matrix to the identity matrix.
void   Rotate()   Adds a rotation operation.
Polygon   Trans()   Performs the stored transformation on $poly. $cx = $y = -1 will set the centre of the Polygon as origin.
void   Translate()   Adds a translation operation.

[ Top ]
Methods
Constructor Transform  [line 497]

  Transform Transform( )

Creates a new Transform object.



[ Top ]
Clear  [line 505]

  void Clear( )

Restores the transformation matrix to the identity matrix.



[ Top ]
Rotate  [line 530]

  void Rotate( number $theta  )

Adds a rotation operation.

Parameters:
number   $theta:  The angle of rotation.


[ Top ]
Trans  [line 549]

  Polygon Trans( Polygon $poly, [int $cx = -1], [int $cy = -1]  )

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.


[ Top ]
Translate  [line 517]

  void Translate( number $x, number $y  )

Adds a translation operation.

Parameters:
number   $x:  Translation along X axis.
number   $y:  Translation along Y axis.


[ Top ]

Documentation generated on Thu, 27 Mar 2008 22:29:49 +0000 by phpDocumentor 1.4.1