ImageClearRect()

edit

Clears the specified rectangle by filling it with the background color of the current drawing surface.

The color is set via ImageSetBackgroundColor()

Requires Extension: Image Extension for Jakarta EE (Lucee 7+)

ImageClearRect( image=object, x=number, y=number, width=number, height=number );

Returns: void

Argument Description
image
object, required
edit

The image on which this operation is performed.

Alias: name

x
number, required
edit

The X coordinate of the rectangle to clear.

y
number, required
edit

The Y coordinate of the rectangle to clear.

width
number, required
edit

The width of the rectangle to clear.

height
number, required
edit

The height of the rectangle to clear.

Examples

edit
img=imageRead("https://avatars1.githubusercontent.com/u/10973141?s=280&v=4")
ImageClearRect(img,180,50,20,30);
cfimage(action="writeToBrowser", source=img);

See also