| Home
| Previous
| Next
| Up

MGL_putBitmapSrcTrans

Draw a transparent lightweight bitmap at the specified location with source transparency.

Declaration

void MGLAPI MGL_putBitmapSrcTrans(
MGLDC *dc,
int x,
int y,
const bitmap_t *bitmap,
color_t transparent,
int op)

Prototype In

mgraph.h

Parameters

dc | Device context to display bitmap on
x | x coordinate to draw bitmap at
y | y coordinate to draw bitmap at
bitmap | Bitmap to display
transparent | Transparent color for the bitmap
op | Write mode to use when drawing bitmap

Description

Draws a transparent lightweight bitmap at the specified location with source transparency. When transferring the data with source transparency, for 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: If you are doing pixel format conversion at the same time (ie: color depth for source bitmap is different to the destination bitmap), then the transparent color value must be set to the traslated destination pixel format. Ie: if you are blitting an 8bpp bitmap to a 32bpp device context, the transparent color must be a 32bpp value.

Note: This routine also only works with pixel depths that are at least 4 bits deep.

See Also

MGL_loadBitmap, MGL_putBitmap, MGL_putBitmapSection, MGL_putBitmapSrcTrans, MGL_putBitmapSrcTransSection, MGL_putBitmapDstTrans, MGL_putBitmapDstTransSection, MGL_putBitmapMask, MGL_putBitmapPatt, MGL_putBitmapPattSection, MGL_putBitmapFx, MGL_putBitmapFxSection, MGL_stretchBitmap, MGL_stretchBitmapSection, MGL_stretchBitmapFx, MGL_stretchBitmapFxSection, MGL_putIcon

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