MM Developer's Guide
MM Interfaces | MM Methods
| MM Types and Misc API
IMoaMmUtils2
Interface ID: IID_IMoaMmUtils2
Pointer type: PIMoaMmUtils2
Inheritance: IMoaUnknown
Header file: mmiutil.h
Description
-
This interface provides utilities for printing messages in the
scripting window, for getting a graphics context from the host
platform, and for converting colors between RGB and the current
palette.
With IMoaMmValue, IMoaMmWndMac,
and IMoaMmWndWin, this interface supersedes
IMoaMmUtils
, which has been made redundant.
Methods
General utilities
-
- PrintMessage()
PrintMessage1()
PrintMessage2()
PrintMessage3()
PrintMessage4()
Imaging support
-
- NewGC()
RGBToIndex()
IndexToRGB()
Syntax
- IndexToRGB(MoaMmColorIndex index, PMoaMmRGBTriple pRGBColor)
Parameters
index
- The color index of the palette entry
pRGBColor
- Pointer to a MoaMmRGBTriple to receive the result
Returns
MoaError
Description
-
Replaces Index2Color() on the Macintosh.
Cross-platform method to convert color index specified to the corresponding
RGB color in the current color palette. The palette currently in use by the
playback window device is used for the lookup,. The device must be set to
indexed color (less than or equal to 8 bits pixel depth) for this method to
work properly. If the device is set to a direct color mode (greater than 8
bits), the results are unpredictable. index specifies the
color index of the palette entry of interest. pRGBColor contains
a pointer to a MoaMmRGBTriple to receive the result.
-
Syntax
RGBToIndex(ConstPMoaMmRGBTriple pRGBColor, PMoaMmColorIndex pIndex)
-
Parameters
pRGBColor
ConstPMoaMmRGBTriple
pIndex
PMoaMmColorIndex
-
Returns
MoaError
Description
Cross-platform method to convert RGB value specified to the closest corresponding
index in the current color palette.
Syntax
- NewGC(ConstPMoaMmNativeGCInfo pNativeGCInfo, PIMoaMmGC * ppGC)
Parameters
pNativeGCInfo
ConstPMoaMmNativeGCInfo
ppGC
PIMoaMmGC *
Returns
MoaError
Description
-
Creates a new IMoaMmGC interface for the native drawing context you
specify (Macintosh WindowPtr or GWorld; Windows HWND, DDB
DC, or DIB DC). Note that for Macintosh graphic contexts, you need to fill
in only the WindowPtror the GWorldPtr of the MoammNativeGCInfo;
the host application handles the qdGlobalsPtr for you. For OS X and
later, the qdGlobalsPtr is not relevant.
For Windows HWND, DIB, or DDB-based graphics contexts,
you must supply an HDC (device context). The caller continues
to own the DC and is responsible for releasing it after releasing
the GC interface. Specific Windows GC types require additional
information (such as the HWND for a Window GC).
Syntax
- PrintMessage(>ConstPMoaChar pMsg)
- PrintMessage1(ConstPMoaChar pMsg, MoaLong arg1)
- PrintMessage2(ConstPMoaChar pMsg, MoaLong arg1, MoaLong arg2)
- PrintMessage3(ConstPMoaChar pMsg, MoaLong arg1, MoaLong arg2, MoaLong arg3)
- PrintMessage4(ConstPMoaChar pMsg, MoaLong arg1, MoaLong arg2, MoaLong arg3, MoaLong arg4)
Parameters
pMsg
- Pointer to the ConstPMoaChar containing the message string
arg1
- MoaLong used in place of printf() % constructions, which format variables
arg2
- MoaLong used in place of printf() % constructions, which format variables
arg3
- MoaLong used in place of printf() % constructions, which format variables
arg4
- MoaLong used in place of printf() % constructions, which format variables
Returns
MoaError
Description
Prints the message pMsg in
the host application debugging or message window. These methods
are similar to the standard C printf()
function, except that they support only fixed numbers
of arguments. The first argument, pMsg,
is the message string. The arguments which follow are inserted
into pMsg in
place of "%" constructions, as in printf().
The constructions available in pMsgare:
Construction
| Argument type
|
%s | C-string
|
%d | integer
|
%ld | long integer
|
%x | hex integer
|
%lx | long hex integer
|
%v | pointer to MoaMmValue.
|
Copyright © 1995-2008 Adobe Macromedia Software LLC, Inc.