Name
RotateLayer -- rotate a layer (V4.0)
Synopsis
RotateLayer(id, angle[, smooth])
Function
This function rotates the layer specified by id by the specified angle (in degrees). A positive angle rotates anti-clockwise, a negative angle rotates clockwise. Additionally, you can choose to have the rotated graphics interpolated by passing True in the smooth argument. The graphics will then be rotated using anti-alias.

When the specified layer is a vector layer (e.g. circle, polygon, true type text or a rectangle) Hollywood will be able to rotate the layer without any loss in quality because vector graphics can be freely transformed. Thus, the smooth argument does not have any function if the specified layer is a vector layer. If the layer contains a pixel image, however, normal pixel based rotation routines will be used.

In contrast to rotating brushes using RotateBrush() layers always keep their original data so there will not be any loss in quality if you rotate a layer forth by some degrees and then back by the same degrees. This is perfectly possible and does not generate any quality losses with RotateLayer().

Inputs
id
layer to rotate
angle
rotation angle in degrees
smooth
optional: whether or not anti-aliased rotation shall be used (only applicable if the layer is not a vector layer)

Show TOC