ColdFusion 9.0 Resources |
ImageDrawLineParameters
UsageEach pair of coordinates, (x1,y1) and (x2,y2), defines a point. The start and end points cannot be the same. This function is affected by the attributes defined in the ImageSetDrawingStroke and ImageSetDrawingColor functions. Use the ImageSetAntialiasing function to improve the quality of the rendered image. Example<!--- This example shows how to draw a square bisected by a diagonal line. ---> <!--- Use the ImageNew function to create a 100x100-pixel image. ---> <cfset myImage=ImageNew("",100,100)> <!--- Turn on antialiasing to improve image quality. ---> <cfset ImageSetAntialiasing(myImage,"on")> <!--- Draw a diagonal line that bisects the square. ---> <cfset ImageDrawLine(myImage,0,0,100,100)> <!--- Display the image in a browser. ---> <cfimage source="#myImage#" action="writeToBrowser"> |