Name
SetBrushDepth -- set brush palette depth (V9.0)
Synopsis
SetBrushDepth(id, depth[, t])
Function
This function sets the depth of the palette of the brush specified by id to the depth specified in depth. depth must be a bit depth ranging from 1 (= 2 colors) to 8 (= 256 colors). See Palette overview for details. Note that if the specified depth is less than that of the pixel data attached to the palette, the pixel data will be remapped to match the new depth.

Starting with Hollywood 10.0, SetBrushDepth() accepts an optional table argument which can contain the following tags:

Remap:
If this tag is set to False, out-of-range pens will not be remapped to existing pens but instead they will simply be set to the pen specified in the ClipPen tag (see below), i.e. no remapping will take place. Note that Remap is only effective when reducing colors. If the new depth has more pens than the old depth, Remap won't do anything. (V10.0)

ClipPen:
This is only used in case the Remap tag is set to False (see above). In that case, out-of-range pens will not be remapped to existing pens but will simply be set to the pen specified in the ClipPen tag, i.e. no remapping will take place. Note that ClipPen is only effective when reducing colors. If the new depth has more pens than the old depth, ClipPen won't do anything. (V10.0)

Inputs
id
identifier of brush to modify
depth
desired new palette depth (ranging from 1 to 8)
t
optional: table argument containing further options (see above) (V10.0)
Example
SetBrushDepth(1, 8)
The code above changes the depth of brush 1's palette to 8 (= 256 colors).

Show TOC