| Home
| Previous
| Next
| Up

DstTransBltBuf

Copies pixels from one buffer into the currently active buffer, with destination color key transparency

Declaration

void GA_bufferFuncs::DstTransBltBuf(
GA_buf *buf,
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

buf | SNAP buffer to blit to the active surface
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 for the blit

Description

This function copies a rectangular region from the source buffer to the active drawing surface, copying from (srcLeft, srcTop, srcLeft+width-1, srcTop+height-1) in the source buffer to (dstLeft, dstTop) in the active buffer. The specified mix is used to combine the pixels in the active buffer along with destination color key transparency.

The transparent color passed will be used to mask out pixels in the destination bitmap from being written. Where a pixel in the destination bitmap matches the transparent color, the pixel will be written to the destination bitmap.

Note: Although you can achieve the same effect of this routine using the generic BitBltBufFx 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

BitBltBuf, BitBltPattBuf, BitBltColorPattBuf, SrcTransBltBuf, BitBltPlaneMaskedBuf, BitBltFxBuf, DrawRectBuf

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