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

Class: Polygon

Source Location: /painter.php

Class Polygon

Class Overview

Encapsulates a polygon.

Located in /painter.php [line 352]



		
		
		
		

Properties

Methods

[ Top ]
Property Summary
number   $Points   An array of the points that form the polygon.

[ Top ]
Method Summary
Polygon   Polygon()   Expands the Arc by the specified number of pixels.
void   AddPoint()   Adds a new Point to the polygon.
void   FromArc()   Makes this Polygon the same as the specified Arc $arc.
void   FromEllipse()   Makes this Polygon the same as the specified Ellipse $el.
void   FromRect()   Makes this Polygon the same as the specified Rect $r.
Point   GetCenter()   Returns the center point of the polygon.

[ Top ]
Properties
number   $Points [line 358]

An array of the points that form the polygon.


[ Top ]
Methods
Constructor Polygon  [line 364]

  Polygon Polygon( [array $pts = null]  )

Expands the Arc by the specified number of pixels.

Parameters:
array   $pts:  An array of Point objects that form the polygon.


[ Top ]
AddPoint  [line 379]

  void AddPoint( Point $pt  )

Adds a new Point to the polygon.

Parameters:
Point   $pt:  The Point to add.


[ Top ]
FromArc  [line 422]

  void FromArc( Arc $arc, [int $step = 10]  )

Makes this Polygon the same as the specified Arc $arc.

Parameters:
Arc   $arc:  The Arc to model.
int   $step:  Smoothness of the generated curve.


[ Top ]
FromEllipse  [line 408]

  void FromEllipse( Ellipse $el, [int $step = 10]  )

Makes this Polygon the same as the specified Ellipse $el.

Parameters:
Ellipse   $el:  The Ellipse to model.
int   $step:  Smoothness of the generated curve.


[ Top ]
FromRect  [line 390]

  void FromRect( Rect $r  )

Makes this Polygon the same as the specified Rect $r.

Parameters:
Rect   $r:  The Rect to model.


[ Top ]
GetCenter  [line 433]

  Point GetCenter( )

Returns the center point of the polygon.



[ Top ]

Documentation generated on Mon, 31 Mar 2008 18:35:26 +0100 by phpDocumentor 1.4.1