Whatever message this page gives is out now! Go check it out!
ImageDrawRect(name, x, y, width, height [, filled])Parameter | Description |
name | Required. The ColdFusion 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. |
filled | Optional. Specify whether the rectangle is filled:
|
<!--- This example shows how to draw a rectangle. --->
<!--- Use the ImageNew function to create a ColdFusion image that is 150 pixels wide and 200 pixels high. --->
<cfset myImage=ImageNew("",150,200)>
<!--- Set the drawing color for the image to yellow. --->
<cfset ImageSetDrawingColor(myImage,"yellow")>
<!--- Turn on antialiasing to improve image quality. --->
<cfset ImageSetAntialiasing(myImage,"on")>
<!--- Draw a filled yellow rectangle on the image. --->
<cfset ImageDrawRect(myImage,25,45,100,20,"yes")>
<!--- Display the image in a browser. --->
<cfimage source="#myImage#" action="writeToBrowser">