Painter Painter(
int
$w, int
$h
)
|
|
Creates a new Painter object.
Parameters:
|
int |
$w: |
The image width. |
|
int |
$h: |
The image height. |
void Antialias(
[bool
$on = true]
)
|
|
Turns on/off antialiasing.
Parameters:
|
bool |
$on: |
Set alias state. |
Draw an Arc.
Parameters:
|
Arc |
$arc: |
The Arc to draw. |
|
Colour |
$clr: |
The colour to use. |
Draw an Ellipse.
Parameters:
|
Ellipse |
$el: |
The Ellipse to draw. |
|
Colour |
$clr: |
The colour to use. |
Draws a line between $pt1 and $pt2.
Parameters:
Draw a Polygon.
Parameters:
|
Polygon |
$poly: |
The Polygon to draw. |
|
Colour |
$clr: |
The colour to use. |
Draw a Rect.
Parameters:
|
Rect |
$rect: |
The Rect to draw. |
|
Colour |
$clr: |
The colour to use. |
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. |
Fill an Ellipse.
Parameters:
|
Rect |
$el: |
The Ellipse to fill. |
|
Colour |
$clr: |
The colour to use. |
Fill a Polygon.
Parameters:
|
Polygon |
$poly: |
The Polygon to fill. |
|
Colour |
$clr: |
The colour to use. |
Fill a Rect.
Parameters:
|
Rect |
$rect: |
The Rect to fill. |
|
Colour |
$clr: |
The colour to use. |
Returns the underlying image handle.
Returns the size of the image.
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. |
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. |
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. |
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. |
void SetThickness(
int
$thickness
)
|
|
Sets the thickness of the lines used by drawing functions.
Parameters:
|
int |
$thickness: |
The line thickness. |
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. |