Packageindex Classtrees Modulegroups Elementlist Report XML Files

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

AuthorsMatt McClanahan <cardinal@dodds.net>
Version0.3

 

Methods inherited from ImlibCliprect

imlibcliprect, get_cliprect, get_cliprect_array, get_cliprect_inuse, set_cliprect, set_cliprect_array, set_cliprect_inuse

Methods inherited from ImlibColor

imlibcolor, get_color, get_color_array, set_color, set_color_array

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

Private Method Summary

bool

_draw_something(int $x, int $y, int $w, int $h, string $cb)

Callback for drawing everything

Fields inherited from ImlibCliprect

$cliprect, $cliprect_inuse

Fields inherited from ImlibColor

$color

Private Field Summary

unknown

$im

Resource 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 $x
X coordinate
int $y
Y coordinate
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
int $x1
X coordinate
int $y1
Y coordinate
int $x2
X coordinate
int $y2
Y coordinate
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
int $x
left X coordinate
int $y
left Y coordinate
int $w
int $h
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 $x
X coordinate
int $y
Y coordinate
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
int $x
left X coordinate
int $y
left Y coordinate
int $w
int $h
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
int $im
resource id#
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
int $x
param
int $y
param
int $w
param
int $h
param
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



Packageindex Classtrees Modulegroups Elementlist Report XML Files
PHPDoc 1.0beta