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   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 900]

  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 932]

  void Antialias( [bool $on = true]  )

Turns on/off antialiasing.

Parameters:
bool   $on:  Set alias state.


[ Top ]
DrawArc  [line 1050]

  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 1010]

  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 955]

  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 1030]

  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 972]

  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 1061]

  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 1020]

  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 1040]

  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 982]

  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 1139]

  void Free( )

Destroys the image.



[ Top ]
GetImage  [line 914]

  image GetImage( )

Returns the underlying image handle.



[ Top ]
GetSize  [line 923]

  array GetSize( )

Returns the size of the image.



[ Top ]
GradFillRect  [line 994]

  void GradFillRect( Rect $rect, Colour $clr1, Colour $clr2, [bool $vert = false]  )

Gradient fill a Rect.

Parameters:
Rect   $rect:  The Rect to fill.
Colour   $clr1:  The start colour.
Colour   $clr2:  The end colour.
bool   $vert:  True for vertical gradient, otherwise false.


[ Top ]
MeasureText  [line 1106]

  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 944]

  void SetThickness( int $thickness  )

Sets the thickness of the lines used by drawing functions.

Parameters:
int   $thickness:  The line thickness.


[ Top ]
WriteText  [line 1074]

  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 Thu, 27 Mar 2008 22:29:48 +0000 by phpDocumentor 1.4.1