ImageSetDrawingColor()
Sets the current drawing color for images. All subsequent graphics operations use the specified color.
Requires Extension: Image Extension for Jakarta EE (Lucee 7+)
ImageSetDrawingColor( image=any, color=string );
Returns: void
| Argument | Description |
|---|---|
|
image
any,
required
|
edit
The image on which this operation is performed. Alias: name |
|
color
string,
required
|
edit
Drawing color (The default value is "black"):
Alias: colour |
Examples
editmyImg = imageNew("",300,200,"rgb","eccc68");
imageSetDrawingColor(myImg,"009432");//All subsequent graphics operations use the specified color.
ImageDrawLine(myImg,0,0,300,200)
ImageDrawText(myImg,"Plant green,",10,90)
ImageDrawText(myImg,"Save world!",180,100)
cfimage(action="writeToBrowser", source=myImg);
See also
- Image manipulation
- image.setDrawingColor()
- Search Issue Tracker open_in_new
- Search Lucee Test Cases open_in_new (good for further, detailed examples)