ImageDrawRoundRect()

Draws a rectangle with rounded corners.

Requires Extension: Image extension

ImageDrawRoundRect( image=any, x=number, y=number, width=number, height=number, arcWidth=number, arcHeight=number, filled=boolean );

Returns: void

Argument Description
image
any, required

The image on which this operation is performed.

Alias: name

x
number, required

The x coordinate of the rectangle.

y
number, required

The y coordinate of the rectangle.

width
number, required

The width of the rectangle.

height
number, required

The height of the rectangle.

arcWidth
number, required

The horizontal diameter of the arc at the four corners.

arcHeight
number, required

The vertical diameter of the arc at the four corners.

filled
boolean, optional

Specify whether the rectangle is filled:

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

Examples

img=imageNew("",200,200,"RGB","b71540");
imageDrawRoundRect(img,45,50,75,125,25,25);
cfimage(action="writeToBrowser",source=img);

See also