imageTranslateDrawingAxis

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.

imageTranslateDrawingAxis(name, x, y) → returns void

Member Function Syntax

someImage.translateDrawingAxis(x, y)

Argument Reference

name string
Required

The image on which this operation is performed.

x numeric
Required

x coordinate

y numeric
Required

y coordinate

Examples
Sample code invoking the imageTranslateDrawingAxis function

CF 11+ Draw a rectangle after the drawing axis has been moved

imgObj = imageNew("",152,152,"rgb","149c82");
imgObj.translateDrawingAxis(50,50);
imgObj.drawRect(40,50,70,50,"yes");
cfimage(action="writeToBrowser", source=imgObj);

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub