contents   index   previous   next



GD dashedLine()

syntax:

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

gd.dashedLine(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 is exactly the same as GD line(), except that a dashed line is drawn. This function is only for backwards compatibility, as much greater control is achieved by using the combination of GD setStyle() and GD line().

 

see:

#link <gd>, GD line(), GD setStyle()

 

example:

var gd = new GD(10,10);

gd.dashedLine( [2,3], [9,7], 0 );

 

// The above code has been replaced by the following

var gd = new GD(10,10);

// Four pixel wide dash

gd.setStyle( [0, 0, 0, 0, -1, -1, -1, -1 );

gd.line( [2,3], [9,6], "styled" );

 


GD destroy()