Shayton Equilibrium Kitchen Utensil 2003 User Manual
122
Chapter 3
•
•
•
•
•
r o t a t e ( )
Rotates the media by the specified angle in degrees. This function fully supports the CMYK
color-space.
color-space.
Syntax
rotate(
Angle @ <value 0 to infinity>
[ResizeCanvas @ <true, false>]
[Smooth @ <true, false>]
[Xs @ <pixels>]
[Ys @ <pixels>]
[layers @ <"layer list">] // (PSD files only)
);
Parameters
Angle
- specifies the number of degrees the image will be rotated. Positive numbers rotate
clockwise and negative numbers rotate counter-clockwise.
ResizeCanvas
- provides for the canvas of the image to be automatically enlarged in
order to encompass the rotated image. The additional area uses the image’s background
color. For more information about setting an image’s background color, see
color. For more information about setting an image’s background color, see
NOTE:
The Enlarge parameter has been deprecated.
Smooth
- provides for smooth edges when rotating to something other than right angles.
Xs
and
Ys
- specify how the image will be cropped after it is rotated.
layers
- for PSD files, specifies the layers to be affected. The layer numbers begin at 0
Example
var image = new Media();
image.load(name @ "pasta.tga");
image.rotate(angle @ 45, smooth @ true);
image.save(type @ "jpeg");