Name
ScaleSprite -- scale a sprite (V2.0)
Synopsis
ScaleSprite(id, width, height)
Function
This command scales the sprite specified by id to the specified width and height.

This function can only be used on sprites that are not referenced by any other sprites. It also cannot be used on sprite links created using CreateSprite() with source type set to #SPRITE.

Please note: You should always do scale operations with the original sprite. For instance, if you scale sprite 1 to 12x8 and then scale it back to 640x480, you will get a messed image. Therefore you should always keep the original brush and scale only copies of it.

You can also pass #KEEPASPRAT as either width or height. Hollywood will calculate the size then automatically by taking the aspect-ratio of the sprite into account.

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

Inputs
id
identifier of the sprite to scale
width
desired new width for the sprite
height
desired new height for the sprite

Show TOC