Name
DisplayBGPicPartFX -- display a part of a background picture with transition
Synopsis
[handle] = DisplayBGPicPartFX(id, x, y, width, height[, table])
Function
This is an extended version of the DisplayBGPicPart() command. It does the same but displays the part with a transition effect.

If layers are enabled, this command will add a new layer of the type #BGPICPART to the layer stack.

Starting with Hollywood 4.0 this function uses a new syntax with just a single table as an optional argument. The old syntax is still supported for compatibility reasons. The optional table argument can be used to configure the transition effect. The following options are possible:

Type:
Specifies the desired effect for the transition. See DisplayTransitionFX for a list of all supported transition effects. (defaults to #RANDOMEFFECT)

Speed:
Specifies the desired speed for the transition. The higher the value you specify here, the faster the effect will be displayed. (defaults to #NORMALSPEED)

Parameter:
Some transition effects accept an additional parameter. This can be specified here. (defaults to #RANDOMPARAMETER)

Async:
You can use this field to create an asynchronous draw object for this transition. If you pass True here DisplayBGPicPartFX() will exit immediately, returning a handle to an asynchronous draw object which you can then draw using AsyncDrawFrame(). See AsyncDrawFrame for more information on asynchronous draw objects.

DX:
Destination x position for the tile. (defaults to the x specified as parameter 2)

DY:
Destination y position for the tile. (defaults to the y specified as parameter 3)

Layers:
Specify True here if the layers of the background picture shall also be displayed (requires enabled layers). (defaults to False)

Inputs
id
identifier of the background picture to use as source
x
left corner
y
top corner
width
width of the tile
height
height of the tile
table
optional: transition effect configuration
Results
handle
optional: handle to an asynchronous draw object; will only be returned if Async has been set to True (see above)
Example
DisplayBGPicPartFX(2, 0, 0, 100, 100, #HSTRIPES32, 10)   ; old syntax

OR

DisplayBGPicPartFX(2, 0, 0, 100, 100, {Type = #HSTRIPES32,
     Speed = 10})  ; new syntax
Display the first 100 pixels and rows from background picture 2 on the screen with the transition effect #HSTRIPES32 at speed 10.

Show TOC