imageDrawBeveledRect
Description
Draws a rectangle with beveled edges.
Categories
Related
imageClearRect imageDrawLine imageDrawLines imageDrawRect imageDrawRoundRect imageSetAntialiasing imageSetDrawingColor imageSetDrawingStroke
History
ColdFusion
8: Added this function.
Syntax
ImageDrawBeveledRect(name, x, y, width, height, raised [, filled])
Attributes
| Attribute | Description | Required | Default |
|---|---|---|---|
| filled | Optional. Specify whether the rectangle is filled: yes: The rectangle is filled with the specified drawing color. no: Only the outline of the rectangle is drawn (default). | ||
| height | Required. The height of the rectangle. | ||
| name | Required. The ColdFusion image on which this operation is performed. | ||
| raised | Required. Specify whether the rectangle appears raised above the surface or sunk into the surface: yes: The rectangle is raised. no: The rectangle is sunk (default). | ||
| width | Required. The width of the rectangle. | ||
| x | Required. The x coordinate of the rectangle. | ||
| y | Required. The y coordinate of the rectangle. |
Returns
Nothing.
Usage
The edges of the rectangle are highlighted so that they appear beveled and lit from the upper-left corner. The colors used for the highlighting effect are determined by the current drawing color.
If the filled parameter is set to yes, the cuboid area is filled with the current drawing color.
Use the ImageSetDrawingColor and ImageSetDrawingStroke functions to specify the color and line attributes of the rectangle. Use the ImageSetAntialiasing function to improve the quality of the rendered image.
If the filled parameter is set to yes, the cuboid area is filled with the current drawing color.
Use the ImageSetDrawingColor and ImageSetDrawingStroke functions to specify the color and line attributes of the rectangle. Use the ImageSetAntialiasing function to improve the quality of the rendered image.
Example
<!--- 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">