imageDrawCubicCurve
Description
Draws a cubic curve.
Categories
Related
imageDrawQuadraticCurve imageDrawRect imageDrawRoundRect imageSetAntialiasing imageSetDrawingColor imageSetDrawingStroke isImageFile
History
ColdFusion
8: Added this function.
Syntax
ImageDrawCubicCurve(name, ctrlx1, ctrly1, ctrlx2, ctrly2, x1, y1, x2, y2)
Attributes
| Attribute | Description | Required | Default |
|---|---|---|---|
| ctrlx1 | Required. The xcoordinate of the first control point of the cubic curve segment. | ||
| ctrlx2 | Required. The x coordinate of the second control point of the cubic curve segment. | ||
| ctrly1 | Required. The y coordinate of the first control point of the cubic curve segment. | ||
| ctrly2 | Required. The y coordinate of the second control point of the cubic curve segment. | ||
| name | Required. The ColdFusion image on which this operation is performed. | ||
| x1 | Required. The x coordinate of the start point of the cubic curve segment. | ||
| x2 | Required. The x coordinate of the end point of the cubic curve segment. | ||
| y1 | Required. The y coordinate of the start point of the cubic curve segment. | ||
| y2 | Required. The y coordinate of the end point of the cubic curve segment. |
Returns
Nothing.
Example
<!--- This example shows how to draw a curved line that looks like a stylized 7. --->
<!--- Use the ImageNew function to create a blank ColdFusion image that is 200 pixels wide and 380 pixels high. --->
<cfset myImage=ImageNew("",200,380)>
<!--- Set the drawing color to magenta. --->
<cfset ImageSetDrawingColor(myImage,"magenta")>
<!--- Turn on antialiasing to improve image quality. --->
<cfset ImageSetAntialiasing(myImage,"on")>
<!--- Draw a curved line that starts at (380,28) and ends at (32,56) with its first control point at (120,380) and its second control point at (5,15). --->
<cfset ImageDrawCubicCurve(myImage,120,380,5,15,380,28,32,56)>
<!--- Display the image in a browser. --->
<cfimage source="#myImage#" action="writeToBrowser">