ColdFusion 9.0 Resources |
ImageDrawPointSee alsoImageDrawLine, ImageDrawLines, ImageSetAntialiasing, ImageSetDrawingColor, ImageSetDrawingStroke Parameters
UsageUse 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"> |