DR Developer's Guide
DR Interfaces | DR Methods | DR Types and Misc API

IMoaDrRTAccess


Interface ID: IID_IMoaDrRTAccess
Pointer type: PIMoaDrRTAccess
Inheritance: IMoaUnknown
Header file: driservc.h

Description

This interface is obsolete has not been supported since Director 6.

This Director callback interface is used to convert a text string containing arbitrary formatting to an IMoaDrAlphaData object that can be rendered in any graphics context. Two of the three methods of this interface are available only at authoring time.

To create an IMoaDrAlphaData object, you call the IMoaDrRTAccess::GenerateAlphaData() method, passing a string representing the text to render, and arrays of information about any style runs contained within the text. Styles in runs are specified using the MoaDrCharStyleData structure.

Methods

GetFontFromUser()
GenerateAlphaData()
NewAlphaData()

GenerateAlphaData()

Syntax

GenerateAlphaData(PIMoaDrRTAccess This,
PMoaDrCharStyleData pStyleData,
MoaLong FAR * selStart,
MoaLong FAR * selEnd,
MoaLong styleCount,
MoaLong width,
const MoaChar FAR * pText,
PIMoaDrAlphaData FAR * pAlphaData)

Parameters

This
Pointer to the IMoaDrRTAccess interface

pStyleData
Array of MoaDrCharStyleData structures

selStart
Array of indexes to starting positions

selEnd
Array of indexes to ending positions

styleCount
Number of entries in style arrays

width
Wrap width of text

pText
Text

pAlphaData
Interface for rendering specified text

Returns

MoaError

Description

Call this method to convert a string formatting specification to an IMoaDrAlphaData object to use to render the formatted text as specified. The string formatting specification consists of several paramaters.

The three arrays, pStyleData, selStart, and selStart, represent the position and formatting of particular style runs within the string pText. The styleCount parameter represents the number of entries in these arrays. When you call this method, it creates and returns an IMoaDrAlphaData object to render the string according to the styles represented in the arrays. You can then call methods of the IMoaDrAlphaData interface to render the text in a graphics context, and to save and retrieve it. According to the "caller owns" rule, you are responsible for releasing this interface when you are through with it.

This method performs as documented only at authoring time, when the Director rtf rendering engine is available to support it. At playback time, it simply returns kMoaDrErr_AuthorTimeOnly.


GetFontFromUser()

Syntax

GetFontFromUser(PIMoaDrRTAccess This,
PMoaDrCharStyleData pStyleData,
PMoaDrCharApplyStyle pApplyStyleFlags)

Parameters

This
Pointer to the IMoaDrRTAccess interface

pStyleData
Structure representing style data

pApplyStyleFlags
Value representing user accepting or cancelling font selection

Returns

MoaError

Description

Displays the standard Font dialog to let the user specify a font. The pStyleData parameter returns the formatting information. The pApplyStyleFlags specifies whether the user has accepted the selected font or cancelled.

When you call this method, you supply a PMoaDrSyleData structure to be filled with formatting information. Fill this structure before calling to specify the defaults to display in the Font dialog.

This method performs as documented only at authoring time. At playback time, it simply returns kMoaDrErr_AuthorTimeOnly.


NewAlphaData()

Syntax

NewAlphaData(PIMoaDrRTAccess This,
PIMoaDrAlphaData FAR * pAlphaData)

Parameters

This
Pointer to the IMoaDrRTAccess interface

pAlphaData
Instance of IMoaDrAlphaData

Returns

MoaError

Description

Creates and returns an instance of the IMoaDrAlphaData interface. If you implement an Asset Xtra that uses an IMoaDrAlphaData object to render text, call this method in your IMoaMmXAsset::StreamInMedia() or IMoaMmXAsset::StreamInProps() methods to create an instance, then call IMoaDrAlphaData::StreamIn() on the resulting object to actually perform the streaming.

This is the only method of this interface available at playback time.


Copyright © 1995-2007 Adobe Macromedia Software LLC, Inc.