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

IMoaDrAlphaData



Interface ID: IID_IMoaDrAlphaData
Pointer type: PIMoaDrAlphaData
Inheritance: IMoaUnknown
Header file: driservc.h

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

Description

This interface is implemented by Director to represent internal data for RTF rendering. With IMoaDrRTAccess, this interface provides Xtras the means to render text in rtf at authoring time, then present it antialiased over any arbitrary background at playback time. The IMoaDrRTAccess interface provides access to the RTF rendering engine built into the Director authoring environment, while this interface provides a way to store rendering information about the text and render the text in a standard Moa graphics context.

Instances of this interface are created by calling IMoaDrRTAccess::GenerateAlphaData(), passing in data representing the text and any formatting within it. Asset Xtras can call the Render() method from their IMoaMmXSpriteActor::Image() method to present the results. They can call the streaming methods of this interface, StreamOut(), StreamIn(), and GetStreamOutSize() to manage storage and retrieval of the information.


Methods

Render()
StreamOut()
StreamIn()
GetStreamOutSize()
GetDimensions()

GetDimensions()

Syntax

GetDimensions(PIMoaDrAlphaData This,
MoaLong FAR * pWidth,
MoaLong FAR * pHeight))

Parameters

This
Pointer to the IMoaDrAlphaData interface

pWidth
Pixel width of rendered text

pHeight)
Pixel height of rendered text

Returns

MoaError

Description

Call this method before calling Render() to determine the size of the text to be rendered.


GetStreamOutSize()

Syntax

GetStreamOutSize(PIMoaDrAlphaData This,
MoaUlong FAR * pSizeBytes))

Parameters

This
Pointer to the IMoaDrAlphaData interface

pSizeBytes)
Size of data to be written

Returns

MoaError

Description

When implementing an asset Xtra that uses an IMoaDrAlphaData object, call this method from your IMoaMmXAsset::GetStreamOutMediaSize() or IMoaMmXAsset::GetStreamOutPropsSize() methods to determine the size of the data to be streamed.


Render()

Syntax

Render(PIMoaDrAlphaData This,
PIMoaMmGC pGC,
PMoaMmRGBTriple pColor,
PMoaRect pWhere))

Parameters

This
Pointer to the IMoaDrAlphaData interface

pGC
Graphics context to render into

pColor
Color of rendered text

pWhere)
Position and size of rendered text

Returns

MoaError

Description

Call this method to render the text represented by this IMoaDrAlphaData object into the graphics context of pGC. The graphics context must be a DIB on Windows, and can be any context supported on the Macintosh. The pWhere parameter specifies the position and size of the text to render, in pixels. To determine the size of this rectangle for displaying the full text, call GetDimensions(). Note that the text will always be rendered in the color specified by pColor, regardless of any color specified in the PMoaDrCharStyleData used to initially create the IMoaDrAlphaData object from the IMoaDrRTAccess interface.


StreamIn()

Syntax

StreamIn(PIMoaDrAlphaData This,
PIMoaStream pInStream))

Parameters

This
Pointer to the IMoaDrAlphaData interface

pInStream)
Stream to read data from

Returns

MoaError

Description

When implementing an asset Xtra that uses an IMoaDrAlphaData object, call this method from your IMoaMmXAsset::StreamInMedia() or IMoaMmXAsset::StreamInProps() methods to retrieve the object.


StreamOut()

Syntax

StreamOut(PIMoaDrAlphaData This,
PIMoaStream pOutStream))

Parameters

This
Pointer to the IMoaDrAlphaData interface

pOutStream)
Stream to write data to

Returns

MoaError

Description

When implementing an asset Xtra that uses an IMoaDrAlphaData object, call this method from your IMoaMmXAsset::StreamOutMedia() or IMoaMmXAsset::StreamOutProps() methods to save the object.

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