RotateLayer -- rotate a layer (V4.0)
RotateLayer(id, angle[, smooth])
This function rotates the layer or layer group 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.

If the specified layer is a vector layer (e.g. circle, polygon, TrueType text or a rectangle) Hollywood will 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 uses raster graphics, however, normal raster-based rotation 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().

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

Show TOC