ColdFusion 9.0 Resources |
ImageRotateDrawingAxisDescriptionRotates all subsequent drawing on a ColdFusion image at a specified point by a specified angle. See alsoImageRotate, ImageSetAntialiasing, ImageSetBackgroundColor, ImageSetDrawingColor, ImageSetDrawingStroke, ImageSetDrawingTransparency, ImageShearDrawingAxis, IsImageFile Parameters
UsageThe default position of the origin is 0,0. To revert to the original drawing axis, call the same (x,y) parameters with the negative of the original angle. Use the ImageSetAntialiasing function to improve the quality of the rendered image. Example<!--- This example shows how to create an image with three shapes drawn on the same axis. ---> <!--- Use ImageNew to create a 300x300-pixel image. ---> <cfset myImage=ImageNew("",300,300)> <!--- Turn on antialiasing to improve image quality. ---> <cfset ImageSetAntialiasing(myImage,"on")> <!--- Set the drawing axis to 30 degrees and the point of rotation at (10,10). ---> <cfset ImageRotateDrawingAxis(myImage,30,10,10)> <!--- Set the drawing color to blue. ---> <cfset ImageSetDrawingColor(myImage,"blue")> <!--- Draw three shapes with the same color and drawing axis. ---> <cfset ImageDrawRect(myImage,150,10,10,150,"yes")> <cfset ImageDrawOval(myImage,200,40,45,65,"yes")> <cfset ImageDrawRect(myImage,275,10,10,150,"yes")> <cfimage source="#myImage#" action="writeToBrowser"> |