Copies an image to a new location on the plane.
imageTranslate(name, xTrans, yTrans [, interpolation])
returns void
someImage.translate(xTrans, yTrans [, interpolation])
Name | Type | Required | Default | Description | Values | |
---|---|---|---|---|---|---|
name | string | Yes | The image on which this operation is performed. | |||
xTrans | numeric | Yes | Displacement in the x direction. | |||
yTrans | numeric | Yes | Displacement in the y direction. | |||
interpolation | string | No | nearest | Type of interpolation | /Users/garethedwards/development/github/cfdocs/docs/functions/imagetranslate.md | bicubic: Applies the bicubic method of interpolation. Generally, the quality of image is highest with this method and processing is slowest. |
CF11+ copy the original image to a new location on the plane
imgObj = imageNew("",152,152,"rgb","149c82");
imgObj.translate(35,35);
imgObj.drawRect(40,50,70,50,"yes");
cfimage(action="writeToBrowser", source=imgObj);