Name
ScaleLayer -- scale a layer (V4.0)
Synopsis
ScaleLayer(id, width, height[, smooth])
Function
This command scales the layer or layer group specified by id to the specified width and height. Optionally, you can choose to have the scaled graphics interpolated by passing True in the smooth argument. The graphics will then be scaled using anti-alias.

If the specified layer is a vector layer (e.g. circle, polygon, TrueType text or a rectangle), Hollywood will scale 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 scaling brushes using ScaleBrush() layers always keep their original data so there will not be any loss in quality if you scale a layer to (20,15) and then back to (640,480). This is perfectly possible.

The width and height arguments can also be a string containing a percent specification, e.g. "50%".

If you prefer to work with relative scaling factors instead of absolute pixel values, then you should use the ScaleX and ScaleY tags of the SetLayerStyle() function instead.

Inputs
id
identifier of the layer to scale
width
desired new width for the layer
height
desired new height for the layer
smooth
optional: whether or not anti-aliased scaling shall be used (only applicable if the layer is not a vector layer)
Example
ScaleLayer(1,640,480)
Scales layer 1 to a resolution of 640x480.

Show TOC