QMedia Text media commands


QM_AddTextSample(movieRef; trackID; sampleTime; sampleDuration; textSample; displayFlags; scrollDelay; hiliteStart; hiliteEnd):error
movieRef Longint Movie reference
trackID Longint Track ID
sampleTime Longint Sample time
sampleDuration Longint Sample duration
textSample Text Text sample
displayFlags Longint Display flags
scrollDelay Longint Scroll delay
hiliteStart Longint Start of hilite text
hiliteEnd Longint End of hilite text
error Longint Error result

Adds a text sample to a text track.

Parameter movieRef is the reference to the movie instance. The movie reference must have been previously obtained with a call to QM_NewMovieFromFile.

Parameter trackID is the ID of the text track.

Parameters sampleTime and sampleDuration specify the insertion point and duration of the text sample. Both must be expressed in the movie's time scale. If sampleTime is -1, the text sample is added to the end of the track. In that case, parameter sampleTime also receives the actual time at which the sample was added.

Parameter textSample is the text sample.

Parameter displayFlags is a set of flags controlling various display options. The displayFlags parameter can be constructed by combining (with addition or bitwise "or") any of the following constants.

qm_txDontDisplay 0x00000001 Don't display the sample.
qm_txDontAutoScale 0x00000002 Don't scale the text if the track display bounds increase or decrease.
qm_txClipToTextBox 0x00000004 Clip track to the text box.
qm_txUseMovieBGColor 0x00000008 Ignore the backColor parameter and use the movie's background color.
qm_txShrinkTextBoxToFit 0x00000010 Shrink the text box to just fit the text.
qm_txScrollIn 0x00000020 Scroll text in until the last of the text is in view.
qm_txScrollOut 0x00000040 Scroll text out until the last of the text is out of view. If flag qm_txScrollIn is also set, the text scrolls in and then out of view.
qm_txHorizScroll 0x00000080 Scroll a line of text horizontally.
qm_txReverseScroll 0x00000100 Reverse scrolling.
qm_txContinuousScroll 0x00000200 New samples cause previous samples to scroll out.
qm_txFlowHoriz 0x00000400 Horizontal scroll text flows in text box rather than extend to right.
qm_txContinuousKaraoke 0x00000800 Ignore hiliteStart and highlight everything up to hiliteEnd.
qm_txDropShadow 0x00001000 Display text with drop shadow.
qm_txAntiAlias 0x00002000 Display anti aliased text.
qm_txKeyedText 0x00004000 Ignore backColor and draw masked text.
qm_txInverseHilite 0x00008000 Use inverse highlighting.
qm_txTextColorHilite 0x00010000 Change text color instead of highlighting.

Parameter scrollDelay has effect only if a scrolling option (qm_txScrollIn or qm_txScrollOut) is set in the displayFlags parameter. If the qm_ScrollIn option is set , text scrolls in for the amount of time specified by scrollDelay and then pauses. If the qm_ScrollOut option is set, the pause occurs before the text scrolls out. If both qm_ScrollIn and qm_ScrollOut are set, the pause occurs at the midpoint between scrolling in and out.

Parameters hiliteStart and hiliteEnd specify the starting and ending offset of the text to be highlighted.


  ` Add 5 seconds of scrolling, transparent, antialiased text
$err:=QM_GetTimeScale ($movie;$timeScale) `Get movie time scale
$sampleTime:=-1 `Append
$sampleDuration:=$timeScale*5 `5 seconds duration
$textSample:="QuickTime rocks!" `Text sample
  `Fancy display flags
$flags:=qm_txHorizScroll | qm_txKeyedText | qm_txAntiAlias
$err:=QM_AddTextSample ($movie;$trackID;$sampleTime;$sampleDuration;$textSample;$flags)

Related commands

QM_SetTextMediaStyle Changes the text style options of new text samples.
QM_SetTextMediaJust Changes the justification of new text samples.
QM_SetTextMediaColors Changes the colors of new text samples.
QM_SetTextMediaBox Changes the text box of new text samples.
QM_SetTextMediaDrop Changes the drop shadow options of new text samples.

QMedia © Escape OE
Generated by QDoc 2.8 on Thu, Nov 24, 2011 18:42:49