| Home
| Previous
| Next
| Up

SrcTransBlt

Copy a block of video memory to another location in video memory with source transparency.

Declaration

void NAPI GA_2DRenderFuncs::SrcTransBlt(
N_int32 srcLeft,
N_int32 srcTop,
N_int32 width,
N_int32 height,
N_int32 dstLeft,
N_int32 dstTop,
N_int32 mix,
GA_color transparent)

Prototype In

snap/graphics.h

Parameters

srcLeft | Left coordinate of the source rectangle to copy
srcTop | Top coordinate of the source rectangle to copy
width | Width of the rectangle in pixels
height | Height of the rectangle in scanlines
dstLeft | Left coordinate of destination
dstTop | Top coordinate of destination
mix | Mix code for the copy (GA_mixCodesType)
transparent | Transparent color value

Description

This function copies a rectangular region of video memory from one location to another with source transparency. This routine will copy a rectangular region of video memory from (srcLeft, srcTop, srcLft+width-1, srcTop+height-1) to (dstLeft, dstTop) within video memory with the specified mix and with source transparency. The mix code will be used to combine the source bitmap data with the pixels in the destination bitmap. The transparent color passed will be used to mask out pixels in the source bitmap from being written to the destination area. Where a pixel in the source bitmap matches the transparent color, the pixel will not be written to the destination bitmap. The results of this function are undefined if the source and destination rectangles overlap.

Note: Although you can achieve the same effect of this routine using the generic BitBltFx function, this function is provided separately as it is usually a workhorse function for sprite based game applications and needs to be as efficient as possible.

See Also

SrcTransBltLin, SrcTransBltSys, SrcTransBltBM, DstTransBlt, BitBlt, BitBltFx

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