SetTransparentPen(pen[, t])
pen
.
Pens are counted from 0. By default, the current display's palette is the active palette but of course only in case
the current display is a palette mode display. See Palette mode displays for details.
A palette can be made the active one by using the SelectPalette() command.
Alternatively, the specified transparent pen can also be set to a different palette object.
To do so, you need to pass the optional table argument to SetTransparentPen()
and specify
the Type
and ID
tags. See below for an example.
The following tags are supported by the optional table argument t
:
Type:
#ANIM #BGPIC #BRUSH #DISPLAY #LAYER #PALETTE #SPRITE |
Note that if you use types #ANIM
or #SPRITE
, you also need to set the Frame
tag (see below) to indicate the frame whose transparent pen you want to modify. If
you use #LAYER
and the specified layer is an anim layer, you also need to
set the Frame
tag.
Type
defaults to the type of the currently active palette selected using
SelectPalette(). See SelectPalette for details.
ID:
Frame:
SetTransparentPen(4, {Type = #BRUSH, ID = 2})The code makes pen 4 in brush 2 transparent.