image.translate()
Copies an image to a new location on the plane.
image.translate( xTrans=number, yTrans=number, interpolation=string )
Returns: Image
| Argument | Description |
|---|---|
|
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:
|
Examples
edit imgObj = imageNew("",200,200,"rgb","149c82");
imgObj.translate(40,40);
imgObj.drawRect(50,50,70,50,"yes");
cfimage(action="writeToBrowser", source=imgObj);
imgObj.translate(40,40);
cfimage(action="writeToBrowser", source=imgObj);