Name
MoveBrush -- move a brush from a to b
Synopsis
[handle] = MoveBrush(id, xa, ya, xb, yb[, table])
Function
This function moves (scrolls) the brush specified by id softly from the location specified by xa,ya to the location specified by xb,yb.

Further parameters can be specified in the optional table argument. The following parameters are recognized:

Speed:
Defines the number of pixels that the brush will be moved per draw. Therefore a higher number means higher speed. You can also specify a constant for the speed argument (#SLOWSPEED, #NORMALSPEED or #FASTSPEED).

FX:
Specifies a special effect that shall be applied to the move. The following effects are currently possible:

#BOUNCE:
Bounces the object at move end

#DAMPED:
Damps the object at move end

#SMOOTHOUT:
Decreases object move speed towards the move end

#SINE:
Displays the object on a sine wave (*)

#BIGSINE:
Displays the object on a big sine wave (*)

#LOWERCURVE:
Moves the object on a curve below the move line (*)

#UPPERCURVE:
Moves the object on a curve above the move line (*)

Effects marked with an asterisk are only possible with horizontal moves, which means that ya and yb coordinates must be equal!

Async:
You can use this field to create an asynchronous draw object for this move. If you pass True here MoveBrush() 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.

Inputs
id
identifier of the brush to move
xa
source x position
ya
source y position
xb
destination x position
yb
destination y position
table
optional: further configuration for this move
Results
handle
optional: handle to an asynchronous draw object; will only be returned if Async has been set to True (see above)
Example
MoveBrush(1, 100, 50, 0, 50, {Speed = 5})
Moves the brush from 100:50 to 0:50 with speed 5.


MoveBrush(1, #RIGHTOUT, #BOTTOM, #LEFTOUT, #BOTTOM, {Speed = #NORMALSPEED})
Moves the brush from the outer right position to the outer left position with a normal speed.

Show TOC