MGL_putBitmapSrcTransSection
Draw a section of a transparent lightweight bitmap at the specified location with source transparency.
Declaration
void MGLAPI MGL_putBitmapSrcTransSection(
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 source 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: 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