Draws a cubic curve.
Nothing.
ImageDrawCubicCurve(name
,ctrlx1
,ctrly1
,ctrlx2
,ctrly2
,x1
,y1
,x2
,y2
)
ImageDrawQuadraticCurve, ImageDrawRect, ImageDrawRoundRect, ImageSetAntialiasing, ImageSetDrawingColor, ImageSetDrawingStroke, IsImageFile
ColdFusion 8: Added this function.
Parameter |
Description |
---|---|
name |
Required. The ColdFusion image on which this operation is performed. |
ctrlx1 |
Required. The x coordinate of the first control point of the cubic curve segment. |
ctrly1 |
Required. The y coordinate 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. |
ctrly2 |
Required. The y coordinate of the second control point of the cubic curve segment. |
x1 |
Required. The x coordinate of the start point of the cubic curve segment. |
y1 |
Required. The y coordinate of the start point of the cubic curve segment. |
x2 |
Required. The x coordinate of the end point of the cubic curve segment. |
y2 |
Required. The y coordinate of the end point of the cubic curve segment. |
Coordinates can be integers or real numbers.
Use the ImageSetDrawingColor and ImageSetDrawingStroke functions to specify the color and line attributes of the cubic curve. Use the ImageSetAntialiasing function to improve the quality of the rendered image.
<!--- 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">