diff options
author | hobbs <hobbs> | 2007-12-05 19:17:32 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2007-12-05 19:17:32 (GMT) |
commit | 1988e3a86b64992ffe55cafa2e7444ec8dfd8c8c (patch) | |
tree | 42180057b58f1ccae689b1c9b682a3df49757fdc | |
parent | e179fd92d09fbb7b30fbd303437176d5895588a3 (diff) | |
download | tk-1988e3a86b64992ffe55cafa2e7444ec8dfd8c8c.zip tk-1988e3a86b64992ffe55cafa2e7444ec8dfd8c8c.tar.gz tk-1988e3a86b64992ffe55cafa2e7444ec8dfd8c8c.tar.bz2 |
* win/tkWinDraw.c: Applied [Patch 1723362] for transparent bitmaps.
-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; |