Name
SetLayerTint -- set light of a layer (V2.0)
Formerly known as
SetLayerLight (V1.5)

Synopsis
SetLayerTint(id, tintcolor, tintlevel)
Function
This function can be used to tint a layer with a specified color at a given level. This is useful if you want to lighten the layer (use #WHITE as tintcolor) or darken it (use #BLACK as tintcolor). Of course you can also use other colors. Level ranges from 0 to 255 where 0 means no tinting (layer default setting) and 255 means full tinting which will make the layer appear fully in the specified color.

Starting with Hollywood 2.0, tintlevel can also be a string containing a percent specification, e.g. "50%".

Please note: Tint calculations take some time on slow 68k computers. Therefore this function is only of limited use if your computer is too slow.

Starting with Hollywood 5.0, this function will simply install a filter of type Tint in the specified layer. See SetLayerFilter for details.

You need to enable layers before you can use this function. See Layers introduction for details.

Inputs
id
id or name of the layer
tintcolor
RGB color to use for tinting
tintlevel
tint level to apply (0 to 255 or percent specification)
Example
EnableLayers()
DisplayBrush(1, #CENTER, #CENTER)
SetLayerTint(1, #BLACK, 128)
The code above darkens layer 1 (= brush 1) with ratio 50% (= 128).

Show TOC