diff options
author | hobbs <hobbs@noemail.net> | 2007-12-05 19:17:31 (GMT) |
---|---|---|
committer | hobbs <hobbs@noemail.net> | 2007-12-05 19:17:31 (GMT) |
commit | b6d4c426350b30dd45e2e33f41ad0e091bcebb7e (patch) | |
tree | 42180057b58f1ccae689b1c9b682a3df49757fdc /win | |
parent | b2afa57ef9f7dc069d371ae1d25388e3f1035118 (diff) | |
download | tk-b6d4c426350b30dd45e2e33f41ad0e091bcebb7e.zip tk-b6d4c426350b30dd45e2e33f41ad0e091bcebb7e.tar.gz tk-b6d4c426350b30dd45e2e33f41ad0e091bcebb7e.tar.bz2 |
* win/tkWinDraw.c: Applied [Patch 1723362] for transparent bitmaps.
FossilOrigin-Name: f4f64f1499d5dcd94ceb9a772d483176a3131b51
Diffstat (limited to 'win')
-rw-r--r-- | win/tkWinDraw.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/win/tkWinDraw.c b/win/tkWinDraw.c index 9366d6d..7c476fb 100644 --- a/win/tkWinDraw.c +++ b/win/tkWinDraw.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWinDraw.c,v 1.12.2.2 2005/07/28 04:57:38 hobbs Exp $ + * RCS: @(#) $Id: tkWinDraw.c,v 1.12.2.3 2007/12/05 19:17:32 hobbs Exp $ */ #include "tkWinInt.h" @@ -415,11 +415,14 @@ XCopyPlane(display, src, dest, gc, src_x, src_y, width, height, dest_x, /* * Case 2: transparent bitmaps are handled by setting the * destination to the foreground color whenever the source - * pixel is set. + * pixel is set. We need to reset the BkColor and TextColor, + * because they affect bitmap color mapping. */ fgBrush = CreateSolidBrush(gc->foreground); oldBrush = SelectObject(destDC, fgBrush); + SetBkColor(destDC, RGB(255,255,255)); + SetTextColor(destDC, RGB(0,0,0)); BitBlt(destDC, dest_x, dest_y, width, height, srcDC, src_x, src_y, MASKPAT); SelectObject(destDC, oldBrush); @@ -429,7 +432,7 @@ XCopyPlane(display, src, dest, gc, src_x, src_y, width, height, dest_x, /* * Case 3: two arbitrary bitmaps. Copy the source rectangle * into a color pixmap. Use the result as a brush when - * copying the clip mask into the destination. + * copying the clip mask into the destination. */ HDC memDC, maskDC; |