ImageDrawLine()

Draws a single line defined by two sets of x and y coordinates on an image.

Requires Extension: Image extension

ImageDrawLine( image=any, x1=number, y1=number, x2=number, y2=number );

Returns: void

Argument Description
image
any, required

The image on which this operation is performed.

Alias: name

x1
number, required

The x coordinate for the start point of the line.

y1
number, required

The y coordinate for the start point of the line.

x2
number, required

The x coordinate for the end point of the line.

y2
number, required

The y coordinate for the end point of the line.

Examples

img=imageNew("",200,200,"RGB","38ada9");
imageDrawLine(img,10,10,100,180);
cfimage(action="writeToBrowser", source=img);

See also