Description

Translates 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.

Returns

Nothing.

Category

Image functions

Function syntax

ImageTranslateDrawingAxis(name, x, y)

See also

ImageSetAntialiasingImageSetDrawingColorImageSetDrawingStrokeImageSetDrawingTransparency
ImageShearDrawingAxisImageTranslateIsImageFile

History

ColdFusion 8: Added this function.

Parameters

Parameter

Description

name

Required. The ColdFusion image on which this operation is performed.

x

x coordinate

y

y coordinate

Usage

All 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

<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">

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy