GA_BitBltFxFlagsType

Declaration

typedef enum {
    gaBltMixEnable                  = 0x00000001,
    gaBltStretchNearest             = 0x00000002,
    gaBltStretchXInterp             = 0x00000004,
    gaBltStretchYInterp             = 0x00000008,
    gaBltColorKeySrcSingle          = 0x00000010,
    gaBltColorKeySrcRange           = 0x00000020,
    gaBltColorKeyDstSingle          = 0x00000040,
    gaBltColorKeyDstRange           = 0x00000080,
    gaBltFlipX                      = 0x00000100,
    gaBltFlipY                      = 0x00000200,
    gaBltBlend                      = 0x00000400,
    gaBltConvert                    = 0x00000800,
    gaBltClip                       = 0x00001000,
    gaBltDither                     = 0x00002000,
    gaBltTranslateVec               = 0x00004000
    } GA_BitBltFxFlagsType

Prototype In

snap/graphics.h

Description

Flags for hardware blitting with special effects, passed to the BltBltFx family of functions. This family of functions exposes a wide variety of special effects blitting if the hardware is capable of these functions. You can determine what special effects are supported by the hardware by examining the BitBltCaps member of the GA_modeInfo structure. However to check whether a set of combined effects are supported, set the desired effects flags in the GA_bltFx structure and call the BitBltFxTest function. The driver will examine the passed in flags and return true if the combination is supported, and false if not. Calling a BltBltFx function with a combination of flags not supported by the hardware will produce undefined results.

The gaBltMixEnable flag determines if the graphics mode supports arbitrary mix modes for extended BitBlt functions.

The gaBltStretchNearest flag determines if the graphics mode supports hardware stretch blitting, with nearest pixel filtering.

The gaBltStretchXInterp flag determines if the graphics mode supports hardware stretch blitting, with linear interpolated filtering in the X direction.

The gaBltStretchYInterp flag determines if the graphics mode supports hardware stretch blitting, with linear interpolated filtering in the Y direction.

The gaBltColorKeySrcSingle flag determines whether the graphics mode supports hardware source transparent blitting with single source color key. When hardware source color keying is enabled, any pixel data in the incoming bitmap that matches the currently set color key will be ignored and not displayed on the screen, essentially making those source pixels transparent.

The gaBltColorKeySrcRange flag determines whether the graphics mode supports hardware source transparent blitting with a range of color keys. This is the same as single source color keying, but the color key values may be allows to fall within a range of available colors (useful if data has been filtered causing the colors to shift slightly).

The gaBltColorKeyDstSingle flag determines whether the graphics mode supports hardware destination transparent blitting with single destination color key. When hardware detination color keying is enabled (sometimes called blue-screening), any destination pixels in the framebuffer that match the currently set color key, will cause the source input pixels to be ignored.

The gaBltColorKeyDstRange flag determines whether the graphics mode supports hardware destination transparent blitting with a range of color keys. This is the same as single destination color keying, but the color key values may be allows to fall within a range of available colors (useful if data has been filtered causing the colors to shift slightly).

The gaBltFlipX flag determines whether the graphics mode supports hardware blitting with data flipped in the X axis. This is useful for 2D sprite based games and animation where the same sprite data can be reused for characters going left or right on the screen by flipping the data during the blit operation.

The gaBltFlipY flag determines whether the graphics mode supports hardware blitting with data flipped in the Y axis. This is useful for 2D sprite based games and animation where the same sprite data can be reused for characters going up or down on the screen by flipping the data during the blit operation.

The gaBltBlend flag determines whether the hardware can support alpha blended blit operations.

The gaBltConvert flag determines whether the hardware can support pixel format conversion.

The gaBltClip flag determines whether the hardware can support clipping while blitting is in effect. This is usually only used to implement proper clipping for stretching operations, where software clipping can get complicated.

The gaBltDither flag determines whether the closest color is selected, or if dithering is used when blitting an RGB bitmap where the destination is an 8bpp, 15bpp or 16bpp device context. Dithering slows things down somewhat for 15/16bpp modes, but produces better quality. Dithering in 8bpp looks best if a halftone palette is used, and in fact is a lot faster than using the closest color method. Dithering in 8bpp will however map to any palette, but the quality is best if a halftone palette is used.

The gaBltTranslateVec is used to indicate that the color translation vector supplied in the TranslateVec member. This is used in situations where the calling code has already computed a color translation vector for the source and destination bitmaps, and will then avoid the overhead of computing the translation vector dynamically for each blit operation. This is only useful when color conversting between 4bpp and 8bpp bitmaps where the destination is also 4bpp or 8bpp (potentially with a different palette).

Note:    These flags are also passed to the BitBltFx family of functions to define the type of extended Blt that should be performed, as well as reporting the available capabilities via the GA_bltFx structure stored in the GA_modeInfo structure.

Note:    Availabiliy of some features may be mututally exclusive on other features. Hence you must call BitBltFxTest first to find out if the set of features that you require are all supported at the same time before attempting to perform an extended BitBlt operation.

Note:    In many cases stretching with X filtering is relatively cheap, while Y filtering is more expensive. Hence it may be faster on some hardware to enable only X filtering and not Y filteringto get improved performance.

Members

gaBltMixEnable

Mix code enabled, defined in GA_bltFx structure

gaBltStretchNearest

Enable stretching, nearest pixel

gaBltStretchXInterp

Enable X axis filtering for stretch blit

gaBltStretchYInterp

Enable Y axis filtering for stretch blit

gaBltColorKeySrcSingle

Source color keying enabled, single color

gaBltColorKeySrcRange

Source color keying enabled, range of colors

gaBltColorKeyDstSingle

Destination color keying enabled, single color

gaBltColorKeyDstRange

Destination color keying enabled, range of colors

gaBltFlipX

Enable flip in X axis

gaBltFlipY

Enable flip in Y axis

gaBltBlend

Enable alpha blending

gaBltConvert

Enable pixel format/palette conversion

gaBltClip

Clip to destination clip rectangle for stretching

gaBltDither

Dither if an 8/15/16bpp destination

gaBltTranslateVec

Color translation vector supplied in TranslateVec

 

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