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

Class: Painter

Source Location: /painter.php

Class Painter

Method Summary
Painter   Painter()   Creates a new Painter object.
void   Antialias()   Turns on/off antialiasing.
void   DrawArc()   Draw an Arc.
void   DrawEllipse()   Draw an Ellipse.
void   DrawLine()   Draws a line between $pt1 and $pt2.
void   DrawPolygon()   Draw a Polygon.
void   DrawRect()   Draw a Rect.
void   FillArc()   Fill an Arc.
void   FillEllipse()   Fill an Ellipse.
void   FillPolygon()   Fill a Polygon.
void   FillRect()   Fill a Rect.
void   Free()   Destroys the image.
image   GetImage()   Returns the underlying image handle.
array   GetSize()   Returns the size of the image.
void   GradFillArc()   Gradient fill an Arc.
void   GradFillEllipse()   Gradient fill an Ellipse.
void   GradFillRect()   Gradient fill a Rect.
Rect   MeasureText()   Calculate the bounding box of some text.
void   SetThickness()   Sets the thickness of the lines used by drawing functions.
void   WriteText()   Writes text.

[ Top ]
Methods
Constructor Painter  [line 1071]

  Painter Painter( int $w, int $h  )

Creates a new Painter object.

Parameters:
int   $w:  The image width.
int   $h:  The image height.


[ Top ]
Antialias  [line 1103]

  void Antialias( [bool $on = true]  )

Turns on/off antialiasing.

Parameters:
bool   $on:  Set alias state.


[ Top ]
DrawArc  [line 1240]

  void DrawArc( Arc $arc, Colour $clr  )

Draw an Arc.

Parameters:
Arc   $arc:  The Arc to draw.
Colour   $clr:  The colour to use.


[ Top ]
DrawEllipse  [line 1183]

  void DrawEllipse( Ellipse $el, Colour $clr  )

Draw an Ellipse.

Parameters:
Ellipse   $el:  The Ellipse to draw.
Colour   $clr:  The colour to use.


[ Top ]
DrawLine  [line 1130]

  void DrawLine( Point $pt1, Point $pt2, Colour $clr  )

Draws a line between $pt1 and $pt2.

Parameters:
Point   $pt1:  Start point.
Point   $pt2:  End point.
Colour   $clr:  The colour to use.


[ Top ]
DrawPolygon  [line 1220]

  void DrawPolygon( Polygon $poly, Colour $clr  )

Draw a Polygon.

Parameters:
Polygon   $poly:  The Polygon to draw.
Colour   $clr:  The colour to use.


[ Top ]
DrawRect  [line 1147]

  void DrawRect( Rect $rect, Colour $clr  )

Draw a Rect.

Parameters:
Rect   $rect:  The Rect to draw.
Colour   $clr:  The colour to use.


[ Top ]
FillArc  [line 1251]

  void FillArc( Arc $arc, Colour $clr, [int $style = 0]  )

Fill an Arc.

Parameters:
Arc   $arc:  The Arc to draw.
Colour   $clr:  The colour to use.
int   $style:  A bitwise OR of the style options or filling arcs.


[ Top ]
FillEllipse  [line 1193]

  void FillEllipse( Rect $el, Colour $clr  )

Fill an Ellipse.

Parameters:
Rect   $el:  The Ellipse to fill.
Colour   $clr:  The colour to use.


[ Top ]
FillPolygon  [line 1230]

  void FillPolygon( Polygon $poly, Colour $clr  )

Fill a Polygon.

Parameters:
Polygon   $poly:  The Polygon to fill.
Colour   $clr:  The colour to use.


[ Top ]
FillRect  [line 1157]

  void FillRect( Rect $rect, Colour $clr  )

Fill a Rect.

Parameters:
Rect   $rect:  The Rect to fill.
Colour   $clr:  The colour to use.


[ Top ]
Free  [line 1362]

  void Free( )

Destroys the image.



[ Top ]
GetImage  [line 1085]

  image GetImage( )

Returns the underlying image handle.



[ Top ]
GetSize  [line 1094]

  array GetSize( )

Returns the size of the image.



[ Top ]
GradFillArc  [line 1262]

  void GradFillArc( Arc $arc, Gradient $grad, [bool $vert = false]  )

Gradient fill an Arc.

Parameters:
Arc   $arc:  The Arc to fill.
Gradient   $grad:  The gradient to use.
bool   $vert:  True for vertical gradient, otherwise false.


[ Top ]
GradFillEllipse  [line 1204]

  void GradFillEllipse( Ellipse $el, Gradient $grad, [bool $vert = false]  )

Gradient fill an Ellipse.

Parameters:
Ellipse   $el:  The Ellipse to fill.
Gradient   $grad:  The gradient to use.
bool   $vert:  True for vertical gradient, otherwise false.


[ Top ]
GradFillRect  [line 1168]

  void GradFillRect( Rect $rect, Gradient $grad, [bool $vert = false]  )

Gradient fill a Rect.

Parameters:
Rect   $rect:  The Rect to fill.
Gradient   $grad:  The gradient to use.
bool   $vert:  True for vertical gradient, otherwise false.


[ Top ]
MeasureText  [line 1325]

  Rect MeasureText( Font $font, string $txt, [int $angle = 0]  )

Calculate the bounding box of some text.

Parameters:
Font   $font:  The font to write.
string   $txt:  The string to write.
int   $angle:  The angle to draw the text at.


[ Top ]
SetThickness  [line 1117]

  void SetThickness( int $thickness  )

Sets the thickness of the lines used by drawing functions.

Parameters:
int   $thickness:  The line thickness.


[ Top ]
WriteText  [line 1287]

  void WriteText( Font $font, Point $pt, string $txt, Colour $clr, [int $angle = 0]  )

Writes text.

Parameters:
Font   $font:  The font to write.
Point   $pt:  The Point to draw the text.
string   $txt:  The string to write.
Colour   $clr:  The Colour to use.
int   $angle:  The angle to draw the text at.


[ Top ]

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