TransformLayer(id, sx, rx, ry, sy[, smooth])
smooth
can be set to True
if Hollywood
should use interpolation during the transformation. This yields results
that look better but interpolation is quite slow.
If the specified layer is a vector layer (e.g. circle, polygon, TrueType
text or a rectangle) Hollywood will be able to transform 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 transforming brushes using TransformBrush() layers always keep their original data so there will not be any loss in quality if you transform a layer to (20,15) and then back to (640,480). This is perfectly possible.
See TransformBrush for more information about how to set up a transformation matrix.
angle = Rad(45) ; convert degrees to radians TransformLayer(1, Cos(angle), Sin(angle), -Sin(angle), Cos(angle))The code above rotates layer number 1 by 45 degrees using a 2x2 transformation matrix.