imageDrawBeveledRect

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])

imageDrawBeveledRect Argument Reference

name
Required

The image on which this operation is performed.

x
Required

The x coordinate of the rectangle.

y
Required

The y coordinate of the rectangle.

width
Required

The width of the rectangle.

height
Required

The height of the rectangle.

raised
Required
Default: false

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

filled
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");
imgObj.drawBeveledRect(50,50,50,50,"yes","yes");
cfimage(action="writeToBrowser", source=imgObj);

Fork me on GitHub