imageDrawCubicCurve

Description

Draws a cubic curve.

Categories

Related

History

ColdFusion 8: Added this function.

Syntax

ImageDrawCubicCurve(name, ctrlx1, ctrly1, ctrlx2, ctrly2, x1, y1, x2, y2)

Attributes

AttributeDescriptionRequiredDefault
ctrlx1Required. The xcoordinate of the first control point of the cubic curve segment.
ctrlx2Required. The x coordinate of the second control point of the cubic curve segment.
ctrly1Required. The y coordinate of the first control point of the cubic curve segment.
ctrly2Required. The y coordinate of the second control point of the cubic curve segment.
nameRequired. The ColdFusion image on which this operation is performed.
x1Required. The x coordinate of the start point of the cubic curve segment.
x2Required. The x coordinate of the end point of the cubic curve segment.
y1Required. The y coordinate of the start point of the cubic curve segment.
y2Required. 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">