MM Developer's Guide
MM Interfaces | MM Methods | MM Types and Misc API
Interface ID: IID_IMoaMmGC
Pointer type:
PIMoaMmGC
Inheritance:
IMoaUnknown
Header file: mmiservc.h
IMoaMmXAsset
methods
for drawing thumbnail images, the IMoaMmXSpriteActor::Image()
method, and the IMoaMmXTransitionActor
methods for performing a transition. You can also acquire a graphics
context interface for doing other drawing by calling IMoaMmUtils::NewGC()
. This
IMoaMmGC
interfacepDestRect
ConstPMoaRect
ConstPMoaRect
representing the area to which to copy pSrcGC
pSrcRect
ink
pInkParams
ConstPMoaMmInkParams
Optional ConstPMoaMmInkParams
specifying ink parameters nativeClipRegion
PMoaVoid
Macintosh RgnHandle
or Window HRGN
MoaError
Blit()
within the Image()
method of a IMoaMmXSpriteActor
implementation, you can use the ink
and inkParams
from
the SpriteInfo
structure
supplied to your Image()
method. This allows you to support whatever ink mode (and parameters)
which were specified by the user for your sprite easily. In Director,
the ink
and inkParams
values are stored in each score cell.MoaMmInk_Copy
. Blit()
returns the
error message kMoaMmErr_NotImplemented
if you attempt to use an ink which is not supported by the host
application. Always check the error code when using Blit()
.
If there's an error, the operation was not performed. Try the
operation again specifying another ink.Blit()
implementation supports all Director ink modes except Matte and
Mask. You'll get the kMoaMmErr_NotImplemented
error if you try to use those modes.blendValue
field of the inkParams
.
You must also set the obeyBlend
field to TRUE.backgroundTransparent
blend; with Director 5.0's Blit()
method, a Copy-style blend is performed. . In future
releases, Director 5.0's Blit()
may support blend combined with various ink modes. Blit()
.
Use a non-black foreground color to colorize the image. To use backgroundTransparent
,
set ink
to kMoaMmInk_BackgroundTransparent
and set bgColor
to
the color you to have the transparent effect. Blit()
with
your own window or offscreen buffer(s), use IMoaMmUtils::NewGC()
to create a graphics context interface for an existing
window or buffer that you own. Releasing the GC interface does not dispose of your window or buffer; you must do this
yourself after releasing the GC.kMoaMmInk_Copy
are supported only if both graphics contexts
are DIB-based. If either GC is a window or DDB DC, the ink mode
is ignored and copy ink is used. Stretching and clipRegion
,
however, are still supported. Director 5.0's offscreen buffer
is always a DIB on Windows.Blit()
method to image a sprite.Blit()
include the following:Blit()
does not
support mask or matte inks. If you try to use an unsupported ink,
the error code kMoaMmErr_NotImplemented
is returned and the operation fails. Blit()
does not
support blends combined with inks. Blit()
ignores
the ink mode if obeyBlend
is
set, and performs a simple Copy-style blend. No error code is
returned; the Blit operation occurs with the specified blendAmount
and the ink mode is ignored. Blends combined with
some ink modes (such as bgTransparent
, matte
, mask
)
may be supported in future releases.
Blit()
method does. Blit()
uses standard
system ink modes, while Director uses internal code. Director
supplies some ink modes combined with a Matte ink. As a result,
images drawn with Blit()
may have visible borders, while images drawn with Director have
their borders matted out. The following list summarizes the ink
modes that Blit()
may draw somewhat differently than Director. Not Copy
Not Transparent
Not Reverse
Not Ghost
Darkest
Lightest
Add
Add Pin
Subtract Pin
This
IMoaMmGC
interfacepContentRect
PMoaRect
Pointer to a MoaRect
to receive the graphics context bounds MoaError
MoaRect
pointed to by pContentRect
. This
IMoaMmGC
interfacepNativeGCInfo
PMoaMmNativeGCInfo
Pointer to a MoaMmNativeGCInfo
structure to receive the information MoaError
PMoaMmNativeGCInfo
structure supplied by the caller in pNativeGCInfo
with platform-dependent information about the graphics context.
The PMoaMmNativeGCInfo
type
is a union structure with variants for various platforms and window
versus offscreen state. This
IMoaMmGC
interfacepPixelDepth
MoaLong FAR *
Pointer to a MoaLong to receive
the pixel depth. MoaError
pPixelDepth
are 1, 2, 4, 8, 16, 24, and 32. This
IMoaMmGC
interfacepNativeGCInfo
ConstPMoaMmNativeGCInfo
Pointer to a ConstPMoaMmNativeGCInfo
kMoaMmErr_GCNotModifiable |
Attempted to modify an application-owned GC |
NewGC()
is used to create the graphics context), the new graphics context
information replaces the old. The caller of NewGC()
owns
the original device context and should dispose of it after changing
it with SetNativeGC()
.
You can dispose of the graphics context entirely using pMyGC->lpVtbl->Release(pMyGC)
.