WriteText

The WriteText method draws text on the specified track and specified range of frames.

WriteText Track,StartFrame,Amount,X,Y,Text,Font,Size,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 place text on.
X
X-coordinate of text relatively top-left corner of the image.
Y
Y-coordinate of text relatively top-left corner of the image.
Text
Text string
Font
Font name to draw text.
Size
Font size to draw text.
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 text options. To have several flags applied to the text, use the bitwise or operation:
ActionValue
bold1
italic2
underline4
strikeout8

Also the following flags are defined:
ActionValue
Method doesn't draw text, it just returns text size256

Return value

The method returns length of text string, in pixels.

Example
This code reads animated gif, writes green text string over it and saves it under new filename:

Set g = CreateObject("shotgraph.gifanimator")
g.Read filename
g.Join
g.WriteText -1,0,g.FramesCount,0,0,"SAMPLE","Times New Roman",22,"00CC00",1
g.Play new_filename