Draws a rectangle with beveled edges.

imageDrawBeveledRect(name, x, y, width, height, raised [, filled]) → returns void

Member Function Syntax

someImage.drawBeveledRect(x, y, width, height, raised [, filled])

Argument Reference for the imageDrawBeveledRect function


Required: Yes
The image on which this operation is performed.


Required: Yes
The x coordinate of the rectangle.


Required: Yes
The y coordinate of the rectangle.


Required: Yes
The width of the rectangle.


Required: Yes
The height of the rectangle.


Required: Yes
Default: false
Specify whether the rectangle appears raised above the surface or sunk into the surface


Required: No
Default: false
Specify whether the rectangle is filled.

Examples sample code invoking the imageDrawBeveledRect function

Tag Syntax

This example shows how to create a bevel-edged rectangle.

<!--- Use the imageNew function to create a 200x200-pixel image. ---> 
 <cfset myImage=imageNew("",200,200)> 
 <!--- Turn on antialiasing to improve image quality. --->  
 <cfset imageSetAntialiasing(myImage,"on")> 
 <!--- Set the drawing color for the image to light gray. ---> 
 <cfset imageSetDrawingColor(myImage,"lightgray")> 
 <!--- Draw a 3D gray, filled, raised rectangle. --->  
 <cfset imageDrawBeveledRect(myImage,50,50,100,75,"yes","yes")> 
 <!--- Display the image in a browser. --->  
 <cfimage source="#myImage#" action="writeToBrowser">  

Using drawBeveledRect member function

CF 11+ Lucee 4.5+ Create a new image and place a raised beveled rectange at its center

imgObj = imageNew("",152,152,"rgb","149c82");
cfimage(action="writeToBrowser", source=imgObj);

Fork me on GitHub