ImageDrawLine()
Draws a single line defined by two sets of x and y coordinates on an image.
Requires Extension: Image Extension for Jakarta EE (Lucee 7+)
ImageDrawLine( image=any, x1=number, y1=number, x2=number, y2=number );
Returns: void
| Argument | Description |
|---|---|
|
image
any,
required
|
edit
The image on which this operation is performed. Alias: name |
|
x1
number,
required
|
edit
The x coordinate for the start point of the line. |
|
y1
number,
required
|
edit
The y coordinate for the start point of the line. |
|
x2
number,
required
|
edit
The x coordinate for the end point of the line. |
|
y2
number,
required
|
edit
The y coordinate for the end point of the line. |
Examples
editimg=imageNew("",200,200,"RGB","38ada9");
imageDrawLine(img,10,10,100,180);
cfimage(action="writeToBrowser", source=img);
See also
- Image manipulation
- image.drawLine()
- Search Issue Tracker open_in_new
- Search Lucee Test Cases open_in_new (good for further, detailed examples)