BitBltFxLin

Copy a linear block of video memory to another location in video memory with optional effects.

Declaration

void NAPI GA_2DRenderFuncs::BitBltFxLin(
    N_int32 srcOfs,
    N_int32 srcPitch,
    N_int32 srcLeft,
    N_int32 srcTop,
    N_int32 srcWidth,
    N_int32 srcHeight,
    N_int32 dstLeft,
    N_int32 dstTop,
    N_int32 dstWidth,
    N_int32 dstHeight,
    GA_bltFx *fx)

Prototype In

snap/graphics.h

Parameters

srcOfs

Offset of source bitmap in video memory

srcPitch

Pitch of source bitmap in bytes

srcLeft

Left coordinate of the source rectangle to copy

srcTop

Top coordinate of the source rectangle to copy

srcWidth

Width of the source rectangle in pixels

srcHeight

Height of the source rectangle in scanlines

dstLeft

Left coordinate of destination

dstTop

Top coordinate of destination

dstWidth

Width of the destination rectangle in pixels

dstHeight

Height of the destination rectangle in scanlines

fx

GA_bltFx structure describing the requested effects

 

Description

This function copies a linear region of video memory from one location to another with the optional features described in the GA_bltFx structure. Note that the value of srcOfs must be aligned to the boundary specified in the BitmapStartAlign member of the GA_modeInfo structure, and the srcPitch value must be padded to multiples of the BitmapStridePad member of the GA_modeInfo structure. Currently this function can perform stretching, source and destination transparency and flipping depending on what features the underlying hardware supports, with an optional mix code. This routine will copy the region (srcLeft, srcTop, srcLeft+srcWidth-1, srcTop+srcHeight-1) from the source bitmap to (dstLeft, dstTop, dstLeft+dstWidth-1, dstTop+dstHeight-1) in video memory. Note that the source and destination rectangle dimensions may be different in, which is the case for doing a copy with bitmap stretching. If the GA_bltFx structure does not indicate stretching is in effect, the dstHeight and dstWidth parameters will be ignored and only the srcWidth and srcHeight parameters will be used. The results of this routine are undefined if the video memory regions overlap.

Note that the srcLeft and srcTop coordinates define an offset within the source bitmap to be copied, so it will copy only a portion of an offscreen bitmap. This is useful for storing multiple images in a single offscreen bitmap, or for handling the case of software clipping offscreen bitmaps if the destination lies outside of the software clip rectangle for the destination buffer.

This version is different to the standard BitBltFx function in that the source bitmap to be copied can be non-conforming, and can have a different logical scanline width to the destination bitmap. This allows the bitmaps to be stored contiguously in offscreen video memory, rather than requiring the offscreen video memory to be divided up into rectangular regions, resulting in more efficient use of available offscreen memory for bitmap storage.

Note:    The value of srcOfs must be aligned to the boundary specified in the BitmapStartAlign member of the GA_modeInfo structure, and the dstPitch value must be padded to multiples of the BitmapStridePad member of the GA_modeInfo structure.

Note:    Some of the features may not be supported at the same time, and it is up to the application programmer to call the BitBltFxTest function to determine what features are supported before calling this function. Calling this function with an unsupported set of features will result in undefined behaviour.

See Also

BitBltFxTest, BitBltFx, BitBltFxSys, BitBltFxBM, SrcTransBlt, DstTransBlt, BitBlt

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