|
|
|
|
bltfx_t
Declaration
typedef struct {
ulong flags;
int writeMode;
color_t colorKeyLo;
color_t colorKeyHi;
int srcBlendFunc;
int dstBlendFunc;
color_t constColor;
int constAlpha;
} bltfx_t
Prototype In
mgraph.h
Description
Information structure passed to the MGL_bitBltFx and related functions. This structure defines the type of BitBlt operation that is performed by the MGL_bitBltFx family of functions. The flags member defines the type of BitBlt operation to be performed, and can be any combination of the supported flags.
If write mode is enabled, the writeMode member is used to determine the logical write mode operation for combining pixels with the destination surface. If write mode is not enabled, MGL_REPLACE_MODE is assumed.
The colorKeyLo and colorKeyHi members define the color key ranges if range based color keying is selected. If only a single color key is enabled, the colorKeyLo value is the value used as the color key. The colorKeyHi value is inclusive in that it is included in the color range. Color keying is used for implementing transparent blits in both source and destination transparency. Note also that if color keying is enabled with color conversion, the colorKeyLo and colorKeyHi values must be in the same format as the destination surface, not the source surface. For instance if you are color converting an 8-bit bitmap to a 32-bit display DC and wish to use transparency, the colorKeyLo and colorKeyHi values must be 32-bit RGB values and not 8-bit color index values.
If blending is enabled, the srcBlendFunc, dstBlendFunc, constColor and and constAlpha values are used to implement the blending operation. Unlike all other drawing functions, the MGL_bitBltFx family of functions do not honor the global MGL blending codes set by MGL_setBlendingFunc, but instead control blending directly via the blending flags in this structure. Also note that enabling any blending operation overrides the setting of the supplied write mode operation. Logical write modes and blending cannot be used at the same time.
Members
flags |
Flags to define the type of BitBlt operation (MGL_bitBltFxFlagsType) |
writeMode |
Logical write mode operation (if write mode is enabled) |
colorKeyLo |
Color key low value of range (if color keying enabled) |
colorKeyHi |
Color key high value of range (if color keying enabled) |
srcBlendFunc |
Src blend function (MGL_blendFuncType) |
dstBlendFunc |
Dst blend function (MGL_blendFuncType) |
constColor |
Constant color value for blending if blending enabled |
constAlpha |
Constant alpha blend factor (0-255 if blending enabled) |
Copyright © 2002 SciTech Software, Inc. Visit our web site at http://www.scitechsoft.com