ColdFusion 9.0 Resources |
ImageTranslateDrawingAxisDescriptionTranslates the origin of the image context to the point (x,y) in the current coordinate system. Modifies the image context so that its new origin corresponds to the point (x,y) in the image’s original coordinate system. See alsoImageSetAntialiasing, ImageSetDrawingColor, ImageSetDrawingStroke, ImageSetDrawingTransparency, ImageShearDrawingAxis, ImageTranslate, IsImageFile Parameters
UsageAll coordinates used in subsequent rendering operations on this image context are relative to the new origin. Use the ImageSetAntialiasing function to improve the quality of the rendered image. Example<!--- Create a 200x200-pixel image. ---> <cfset myImage=ImageNew("",200,200)> <!--- Turn on antialiasing to improve image quality. ---> <cfset ImageSetAntialiasing(myImage)> <!--- Translate the origin to (100,20). ---> <cfset ImageTranslateDrawingAxis(myImage,100,20)> <!--- Draw a rectangle at the offset location. ---> <cfset ImageDrawRect(myImage,50,60,40,50)> <!--- Display the image in a browser. ---> <cfimage source="#myImage#" action="writeToBrowser"> |