contents   index   previous   next



GD line()

syntax:

gd.line(x1, y1, x2, y2, color)

gd.line(point1, point2, color)

where:

x1 - horizontal pixel location of starting point

 

y1 - vertical pixel location of starting point

 

x2 - horizontal pixel location of ending point

 

y2 - vertical pixel location of ending point

 

point1 - First point specification.

 

point2 - Second point specification.

 

color - color index or style to use for drawing line

 

return:

void.

 

description:

This method draws a line using color index color, starting from position (x1, y1) and going to position (x2, y2). Alternatively, the line is drawn from point1 to point2, if the coordinates are given in this manner. If either coordinate is out of bounds, then no drawing is done.

 

see:

#link <gd>, GD dashedLine()

 

 


GD polygon()