Whatever message this page gives is out now! Go check it out!
ImageDrawQuadraticCurve(name, x1, y1, ctrlx, ctrly, x2, y2)Parameter | Description |
name | Required. The ColdFusion image on which this operation is performed. |
x1 | Required. The x coordinate of the start point of the quadratic curve segment. |
y1 | Required. The y coordinate of the start point of the quadratic curve segment. |
ctrlx | Required. The x coordinate of the control point of the quadratic curve segment. |
ctrly | Required. The y coordinate of the control point of the quadratic curve segment. |
x2 | Required. The x coordinate of the end point of the quadratic curve segment. |
y2 | Required. The y coordinate of the end point of the quadratic curve segment. |
<!--- This example shows how to draw a curved line. --->
<!--- Use the ImageNew function to create a 400x400-pixel image. --->
<cfset myImage=ImageNew("",400,400)>
<!--- Turn on antialiasing to improve image quality. --->
<cfset ImageSetAntialiasing(myImage,"on")>
<!--- Set the drawing color to green. --->
<cfset ImageSetDrawingColor(myImage,"green")>
<!--- Draw a curved line on the image. --->
<cfset ImageDrawQuadraticCurve(myImage,120,320,5,15,380,280)>
<!--- Display the image in a browser. --->
<cfimage source="#myImage#" action="writeToBrowser"><cfscript>
myImage=ImageNew("",800,400); // Create an 800x400 image
ImageSetAntialiasing(myImage,"on"); // Turn on antialiasing to improve image quality
ImageSetDrawingColor(myImage,"green"); // Set the drawing color to green
ImageDrawQuadraticCurve(myImage,120,300,200,125,380,280); // Draw a curved line on the image
ImageWrite(myImage,"QuadraticCurve.png"); // Write the image to a file
</cfscript>