Supported Browsers Home   
MGL_putBufferSrcTrans Previous   
MGL_putDivot Next   
External Functions Up   

MGL_putBufferSrcTransSection

Copy a section of an offscreen buffer to the specified location with source transparency.

Declaration

void MGLAPI MGL_putBufferSrcTransSection(
    MGLDC *dc,
    int left,
    int top,
    int right,
    int bottom,
    int dstLeft,
    int dstTop,
    MGLBUF *buf,
    color_t transparent,
    int op)

Prototype In

mgraph.h

Parameters

dc

Device context to copy buffer to

left

Left coordinate of section to copy

top

Top coordinate of section to copy

right

Right coordinate of section to copy

bottom

Bottom coordinate of section to copy

dstLeft

Left coordinate of destination to copy buffer to

dstTop

Right coordinate of destination 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 section of an offscreen buffer to the specified location on the device context with either source or destination transparency.

When transferring the data with source transparency, pixels in the source image that are equal to the specified transparent color, the related pixel in the destination buffer will remain untouched. This allows you to quickly transfer sprites between device contexts with a single color being allocated as a transparent color.

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