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

name string

The image on which this operation is performed.

x numeric

The x coordinate of the rectangle.

y numeric

The y coordinate of the rectangle.

width numeric

The width of the rectangle.

height numeric

The height of the rectangle.

raised boolean
Default: false

Specify whether the rectangle appears raised above the surface or sunk into the surface

filled boolean
Default: false

Specify whether the rectangle is filled.

Sample code invoking the imageDrawBeveledRect function

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">  

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

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

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub