SelectAnim(id, frame[, mode, combomode])
The optional mode
argument defaults to #SELMODE_NORMAL
which means
that only the color channels of the anim will be altered when you draw
to it. The transparency channel of the anim (can be either a mask or an
alpha channel) will never be altered. You can change this behaviour by
using #SELMODE_COMBO
in the optional mode
argument. If you use this
mode, every Hollywood graphics command that is called after SelectAnim()
will draw into the color and transparency channel of the anim. If the
anim does not have a transparency channel, #SELMODE_COMBO
behaves the
same as #SELMODE_NORMAL
.
Starting with Hollywood 5.0 you can use the optional combomode
argument
to specify how #SELMODE_COMBO
should behave. If combomode
is set to
0, the color and transparency information of all pixels in the source
image are copied to the destination image in any case - even if the
pixels are invisible. This is the default behaviour. If combomode
is set
to 1, only the visible pixels are copied to the destination image. This
means that if the alpha value of a pixel in the source image is 0, i.e. invisible,
it will not be copied to the destination image. Hollywood 6.0 introduces
the new combomode 2. If you pass 2 in combomode
, Hollywood will blend
color channels and alpha channel of the source image into the destination
image's color and alpha channels. When you draw the destination image later,
it will look as if the two images had been drawn on top of each other
consecutively. Please note that the combomode
argument is only supported
together with #SELMODE_COMBO
. It doesn't have any effect when used with the
other modes. Please note that the combomode
argument is only supported
together with #SELMODE_COMBO
. It doesn't have any effect when used with the
other modes.
An alternative way to draw into the transparency channels of an anim is
to do this separately using SelectMask() or SelectAlphaChannel(). These
two commands, however, will write data to the transparency channel only.
They will not touch the color channel. So if you want both channels,
color and transparency, to be affected, you need to use SelectAnim()
with mode
set to #SELMODE_COMBO
.
When you are finished with rendering to your animation and want to use your display as output device again, just call EndSelect().
Note that you must not call any commands which modify your animation while it is selected as the output device. Specifically, you must not call ScaleAnim(), FreeAnim(), or ModifyAnimFrames().
Only commands that output graphics directly can be used after SelectAnim()
.
You may not call animated functions like MoveAnim() or DisplayBrushFX()
while SelectAnim()
is active.
This command works only with animations buffered entirely in memory. You cannot use it for animations that are played directly from disk.
#SELMODE_NORMAL
or #SELMODE_COMBO
; defaults to
#SELMODE_NORMAL
#SELMODE_COMBO
is active (see above);
defaults to 0 (V5.0)SelectAnim(1, 5) SetFillStyle(#FILLCOLOR) Box(0, 0, 320, 256, #RED) EndSelect()The code above draws a 320x256 rectangle to frame number 5 of animation 1.