Supported Browsers Home   
GA_blendFuncType Previous   
GA_buf Next   
Type Definitions Up   

GA_bltFx

Declaration

typedef struct {
    N_uint32        dwSize;
    N_uint32        Flags;
    N_int32         Mix;
    GA_color        ColorKeyLo;
    GA_color        ColorKeyHi;
    N_int32         SrcBlendFunc;
    N_int32         DstBlendFunc;
    GA_color        ConstColor;
    N_uint32        ConstAlpha;
    N_int32         BitsPerPixel;
    GA_pixelFormat  *PixelFormat;
    GA_palette      *DstPalette;
    GA_palette      *SrcPalette;
    GA_color        *TranslateVec;
    N_int32         ClipLeft;
    N_int32         ClipTop;
    N_int32         ClipRight;
    N_int32         ClipBottom;
    } GA_bltFx

Prototype In

snap/graphics.h

Description

Hardware 2D BitBltFx information structure. This structure defines the type of BitBlt operation that is performed by the 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 (be sure to call BitBltFxTest first to determine if that combination of effects is supported).

If mixes are enabled, the Mix member is used to determine the mix operation to apply. If mixes are not enabled, GA_REPLACE_MIX is assumed (some hardware may not support mix operations for effects blits).

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.

If blending is enabled, the SrcBlendFunc, DstBlendFunc and Alpha values are used to implement the blending operation.

If clipping is enabled, the destination clip rectangle is passed in the ClipLeft, ClipTop, ClipRight and ClipBottom members. Clipping is most useful for stretching operations, where clipping in software is problematic.

If color conversion is enabled and you are color converting between color index pixel formats and other pixel formats (including palette remapping), you can optionally pass in a pre-computed translation vector in the TranslateVec member. This will be used in place of dynamically computing the color translation vector on the fly during the blit operation, so it is faster in cases where the translation vector is known in advance for a number of blit operations.

Note:    The dwSize member is intended for future compatibility, and should be set to the size of the structure as defined in this header file. Future drivers will be compatible with older software by examiming this value.

Note:    The ColorKeyLo and ColorKeyHi values are always color values in the format of the destination surface color depth and pixel format. Ie: if you are color converting an 8bpp bitmap to a 32bpp destination surface, the color key values will be 32bpp color key values, not 8bpp color key values.

Members

dwSize

Set to size of structure in bytes

Flags

BitBltFx flags to define the type of BitBlt operation (GA_BitBltFxFlagsType)

Mix

Logical mix operation (if mixes 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 (GA_blendFuncType)

DstBlendFunc

Dst blend function (GA_blendFuncType)

ConstColor

Constant color value for blending if blending enabled

ConstAlpha

Constant alpha blend factor (0-255 if blending enabled)

BitsPerPixel

Color depth for the source bitmap

PixelFormat

Pixel format for the source bitmap

DstPalette

Color index palette for destination (if destination color index)

SrcPalette

Color index palette for source bitmap (if source color index)

TranslateVec

Pre-computed color translation vector for color conversion

ClipLeft

Left coordinate for destination clip rectangle

ClipTop

Top coordinate for destination clip rectangle

ClipRight

Right coordinate for destination clip rectangle

ClipBottom

Bottom coordinate for destination clip rectangle

 

Copyright © 2002 SciTech Software, Inc. Visit our web site at http://www.scitechsoft.com