ColdFusion 9.0 Resources |
ImageDrawCubicCurveSee alsoImageDrawQuadraticCurve, ImageDrawRect, ImageDrawRoundRect, ImageSetAntialiasing, ImageSetDrawingColor, ImageSetDrawingStroke, IsImageFile Parameters
UsageCoordinates 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. 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"> |