|
|
|
|
MGL_putBitmapDstTransSection
Draw a section of a transparent lightweight bitmap at the specified location with destination transparency.
Declaration
void MGLAPI MGL_putBitmapDstTransSection(
MGLDC *dc,
int left,
int top,
int right,
int bottom,
int dstLeft,
int dstTop,
const bitmap_t *bitmap,
color_t transparent,
int op)
Prototype In
mgraph.h
Parameters
dc |
Device context to display bitmap on |
left |
Left coordinate of section to draw |
top |
Top coordinate of section to draw |
right |
Right coordinate of section to draw |
bottom |
Bottom coordinate of section to draw |
dstLeft |
Left coordinate of destination of bitmap section |
dstTop |
Right coordinate for destination of bitmap section |
bitmap |
Bitmap to display |
transparent |
Transparent color for the bitmap |
op |
Write mode to use when drawing bitmap |
Description
Draws a section of a transparent lightweight bitmap at the specified location with 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: 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