DisplayBGPicPart(id, x, y, width, height[, dx, dy, table])
id
on the screen. The tile is defined by x
, y
and its width
and
height
.
If layers are enabled, this command will add a new layer of the type
#BGPICPART
to the layer stack.
As of Hollywood 4.0, this command uses a new syntax, although the old syntax is still supported for compatibility reasons. New scripts should use the new syntax, though. The new syntax accepts a table as the last argument which allows you to specify several further options:
Layers:
True
, the layers (in case layers are enabled)
or the foreground graphics (in case layers are disabled) of
the background picture are drawn, too. This is useful if you
want to create an exact copy of a background picture in a brush,
for example. Please note that if layers are disabled, you can
use this argument only if id
specifies the identifier of the current
background picture because Hollywood does not keep the entire
foreground contents of all background pictures if layers are
disabled.
Furthermore, the optional table argument can also contain one or more of the standard tags for all drawing commands. See Standard drawing tags for more information about the standard tags that nearly all Hollywood drawing commands support.
DisplayBGPicPart(2,0,0,100,100)Display the first 100 pixels and rows from background picture 2 on the screen at position 0:0.
width = GetAttribute(#DISPLAY, 0, #ATTRWIDTH) height = GetAttribute(#DISPLAY, 0, #ATTRHEIGHT) id = GetAttribute(#DISPLAY, 0, #ATTRBGPIC) CreateBrush(1, width, height) SelectBrush(1) DisplayBGPicPart(id, 0, 0, width, height, 0, 0, {Layers = TRUE}) EndSelectThis code makes a copy of the current display contents in brush 1.