MGL_putBufferDstTrans

Copy an offscreen buffer to the specified location with destination transparency.

Declaration

void MGLAPI MGL_putBufferDstTrans(
    MGLDC *dc,
    int x,
    int y,
    MGLBUF *buf,
    color_t transparent,
    int op)

Prototype In

mgraph.h

Parameters

dc

Device context to copy buffer to

x

x coordinate to copy buffer to

y

y coordinate to copy buffer to

buf

Buffer to copy

transparent

Transparent color for the bitmap

op

Write mode to use when drawing buffer

 

Description

Copies a offscreen buffer to the specified location on the device context with either source or destination transparency.

When transferring the data with destination transparency, pixels in the destination image that are equal to the specified transparent color will be updated, and those pixels that are not the same will be skipped. This is effectively the operation performed for 'blueScreen'ing or color keying and can also be used for drawing transparent sprites. Note however that destination transparency is very slow in software compared to source transparency!

Note:    This function will fail if you attempt to copy a buffer to a device context that is not the device context that the original buffer was allocated for.

See Also

MGL_copyToBuffer, MGL_copyBitmapToBuffer, MGL_updateBufferCache, MGL_updateFromBufferCache, MGL_putBuffer, MGL_putBufferSection, MGL_putBufferSrcTrans, MGL_putBufferSrcTransSection, MGL_putBufferDstTrans, MGL_putBufferDstTransSection, MGL_putBufferPatt, MGL_putBufferPattSection, MGL_putBufferFx, MGL_putBufferFxSection, MGL_stretchBuffer, MGL_stretchBufferSection, MGL_stretchBufferFx, MGL_stretchBufferFxSection

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