Name
RemapBrush -- remap brush colors (V9.0)
Synopsis
RemapBrush(id, palid[, t])
Function
This function can be used to remap the colors of the brush specified by id to the colors of the palette specified by palid. The source brush can either be a normal or a palette brush. If it is a normal brush, RemapBrush() will also convert it to a palette brush while remapping so the resulting brush will always be a palette brush.

The optional table argument t can be used to specify additional options. The following table tags are currently recognized:

Dither:
This tag allows you to control whether or not dithering should be used. Set this to True to enable or to False to disable dithering. Defaults to True.

Note that if the brush uses transparency, you have to use SetTransparentPen() on the palette first to define a pen that should be made transparent.

Inputs
id
identifier of the brush to remap
palid
identifier of the palette whose colors the brush should be remapped to
t
optional: table containing further arguments
Example
CreatePalette(1, {#BLACK, #WHITE}, {Depth = 1})
RemapBrush(1, 1, {Dither = True})
Convert brush 1 to a black & white palette brush. Remapping will be done with dithering enabled.

Show TOC