Rectangle

The Rectangle method draws rectangle on the specified track and specified range of frames.

Rectangle Track,StartFrame,Amount,X,Y,Width,Height,Color,Options

Parameters

Track
Zero-based track number. Negative value means the target animation track.
StartFrame
Zero-based start frame number.
Amount
Amount of frames to draw rectangle on.
X
X-coordinate of rectangle relatively top-left corner of the image.
Y
Y-coordinate of rectangle relatively top-left corner of the image.
Width
Width of rectangle
Height
Height of rectangle
Color
Color of text as a string in hexadecimal form (RRGGBB) or empty string. The empty string means the transparent color.
Options
Different flags to set shape options. Currently the following flags are defined:
ValueMeans
1Only rectangle outline will be drawn


Example
This code reads animated gif, draws a red rectangle over it and saves animation under new filename:

Set g = CreateObject("shotgraph.gifanimator")
g.Read filename
g.Join
g.Rectangle -1,0,g.FramesCount,10,10,40,40,"CC0000",1
g.Play new_filename