image.setBackgroundColor()
Sets the background color for the image. The background color is used for clearing a region. Setting the background color only affects the subsequent ImageClearRect calls
image.setBackgroundColor( color=string )
Returns: Image
| Argument | Description |
|---|---|
|
color
string,
required
|
edit
Background color (The default value is "black"):
Alias: colour |
Examples
edit img=imageread("https://avatars1.githubusercontent.com/u/10973141?s=280&v=4");
img.SetBackGroundColor("red");
img.ClearRect(20,20,70,50);
cfimage(action="writeToBrowser",source=img);