ImageDrawLines

Draws a sequence of connected lines defined by arrays of x and y coordinates.

ImageDrawLines( image, xcoords, ycoords [, isPolygon [, filled ] ] )

Returns: void

Argument Description
image
any, required

The image on which this operation is performed.

Alias: name

xcoords
array, required

An array of x coordinates.

ycoords
array, required

An array of y coordinates.

isPolygon
boolean, optional

Specify whether the lines form a polygon:

  • true: The lines are connected to form a polygon.
  • false (default): The lines do not form a polygon.
filled
boolean, optional

Specify whether the polygon is filled:

  • true: The polygon is filled with the specified drawing color.
  • false (default): Only the outline of the polygon is drawn.

Examples

img=imageNew("",200,200,"RGB","4a69bd");
imageDrawLines(img,[10,50,100,50],[100,10,100,152],"yes","no");
cfimage(action="writeToBrowser",source=img);

See also