imageDrawPoint
Description
Draws a point at the specified (x,y) coordinate.
Categories
Related
History
ColdFusion
8: Added this function.
Syntax
ImageDrawPoint(name, x, y)
Attributes
| Attribute | Description | Required | Default |
|---|---|---|---|
| name | Required. The ColdFusion image on which this operation is performed. | ||
| x | Required. The x coordinate of the point. | ||
| y | Required. The y coordinate of the point. |
Returns
Nothing.
Usage
Use the ImageSetDrawingStroke and ImageSetDrawingColor functions to control the appearance of the drawing point. For example, set the width attribute of the ImageSetDrawingStroke function to 10 pixels to draw a 20-pixel-square centered at (x,y). Use the ImageSetAntialiasing function to improve the quality of the rendered image.
Example
<!--- This example shows how to draw a large square in the middle of an image. --->
<!--- Use the ImageNew function to create a 200x200-pixel image. --->
<cfset myImage=ImageNew("",200,200)>
<!---Set the drawing color to orange. --->
<cfset ImageSetDrawingColor(myImage,"orange")>
<!--- Turn on antialiasing to improve image quality. --->
<cfset ImageSetAntialiasing(myImage,"on")>
<!--- Set the drawing area to 10 pixels. --->
<cfset attr = StructNew()>
<cfset attr.width = 10>
<cfset ImageSetDrawingStroke(myImage,attr)>
<!--- Draw the point at (100,100). --->
<cfset ImageDrawPoint(myImage,100,100)>
<!--- Display the image in a browser. --->
<cfimage source="#myImage#" action="writeToBrowser">