|
|
File: /home/matt/src/cvs/imlib/docs/class.ImlibDraw.php
PHP Imlib2 Classes - Imlib
ImlibDraw
ImlibColor | +-- ImlibCliprect | +-- ImlibDraw
Does everything relevant to drawing or filling ellipses, lines, or rectangles
|
public class ImlibDraw extends ImlibCliprect
Does everything relevant to drawing or filling ellipses, lines, or rectangles
|
|
|
|
|
Public Method Summary |
void |
ImlibDraw()ImlibDraw constructor |
bool |
draw_ellipse(int $x, int $y, int $w, int $h)Draw an ellipse |
bool |
draw_line(int $x1, int $y1, int $x2, int $y2)Draw a line |
bool |
draw_rectangle(int $x, int $y, int $w, int $h)Draw a rectangle |
bool |
fill_ellipse(int $x, int $y, int $w, int $h)Fill an ellipse |
bool |
fill_rectangle(int $x, int $y, int $w, int $h)Fill a rectangle |
void |
get_image()Get the current image resource id# |
void |
set_image(int $im)Set the image resource id# to draw on |
|
|
|
Fields inherited from ImlibColor |
$color |
|
Private Field Summary |
unknown |
$imResource id# of the image to draw on |
|
Public Method Details |
ImlibDraw |
public void ImlibDraw( )
|
|
ImlibDraw constructor
|
Returns |
void |
|
draw_ellipse |
public bool draw_ellipse( int $x, int $y, int $w, int $h )
|
|
Draw an ellipse
|
Parameter |
|
|
|
|
|
int |
$w |
|
|
horizontal amplitude |
|
|
int |
$h |
|
|
vertical amplitude |
|
Returns |
bool False if no image is set yet |
|
draw_line |
public bool draw_line( int $x1, int $y1, int $x2, int $y2 )
|
|
Draw a line
|
Parameter |
|
|
|
|
|
|
|
|
Returns |
bool False if no image is set yet |
|
draw_rectangle |
public bool draw_rectangle( int $x, int $y, int $w, int $h )
|
|
Draw a rectangle
|
Parameter |
|
|
|
|
|
|
|
|
Returns |
bool False if no image is set yet |
|
fill_ellipse |
public bool fill_ellipse( int $x, int $y, int $w, int $h )
|
|
Fill an ellipse
|
Parameter |
|
|
|
|
|
int |
$w |
|
|
horizontal amplitude |
|
|
int |
$h |
|
|
vertical amplitude |
|
Returns |
bool False if no image is set yet |
|
fill_rectangle |
public bool fill_rectangle( int $x, int $y, int $w, int $h )
|
|
Fill a rectangle
|
Parameter |
|
|
|
|
|
|
|
|
Returns |
bool False if no image is set yet |
|
get_image |
public void get_image( )
|
|
Get the current image resource id#
|
Returns |
void |
|
set_image |
public void set_image( int $im )
|
|
Set the image resource id# to draw on
|
Parameter |
|
|
Returns |
void |
|
|
Private Method Details |
_draw_something |
private bool _draw_something( int $x, int $y, int $w, int $h, string $cb )
|
|
Callback for drawing everything
Since all the drawing functions work the same way, this functiondoes all the work. It takes four ints, often x,y,w,h, and passesthem to the specified function.
|
Parameter |
|
|
|
|
|
|
|
|
|
string |
$cb |
|
|
name of the function to call |
|
Returns |
bool False if no image is set yet |
|
|
Private Field Details |
$im |
private unknown $im
>> <<
Resource id# of the image to draw on
|
|
|
|
|
PHPDoc 1.0beta |