ImageTranslate()
Copies an image to a new location on the plane.
Requires Extension: Image Extension for Jakarta EE (Lucee 7+)
ImageTranslate( image=any, xTrans=number, yTrans=number, interpolation=string );
Returns: void
| Argument | Description | Default |
|---|---|---|
|
image
any,
required
|
edit
The image on which this operation is performed. Alias: name |
|
|
xTrans
number,
required
|
edit
Displacement in the x direction. |
|
|
yTrans
number,
required
|
edit
Displacement in the y direction. |
|
|
interpolation
string,
optional
|
edit
Type of interpolation:
|
nearest |
Examples
edit imgObj = imageNew("",152,152,"rgb","149c82");
imgObj.translate(10,10);
imgObj.drawRect(40,50,70,50,"yes");
cfimage(action="writeToBrowser", source=imgObj);
See also
- Image manipulation
- image.translate()
- Search Issue Tracker open_in_new
- Search Lucee Test Cases open_in_new (good for further, detailed examples)