Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSilenio Quarti2001-09-04 17:30:34 +0000
committerSilenio Quarti2001-09-04 17:30:34 +0000
commit6ad6f774040a2a1c32f174a6e32172c88bc25587 (patch)
tree5dbed511f11b2fbc37dbb9539ea1617b6faeb4cd
parent72bca330545187aed3f298af1ba72f7fcfb258d6 (diff)
downloadeclipse.platform.swt-6ad6f774040a2a1c32f174a6e32172c88bc25587.tar.gz
eclipse.platform.swt-6ad6f774040a2a1c32f174a6e32172c88bc25587.tar.xz
eclipse.platform.swt-6ad6f774040a2a1c32f174a6e32172c88bc25587.zip
1GIZ0P6: SWT:WINNT - GC.drawImage() problem with transparent pixels
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GC.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GC.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GC.java
index fa5b21d14c..bbc7330984 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GC.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GC.java
@@ -722,10 +722,10 @@ void drawBitmapTransparent(Image srcImage, int srcX, int srcY, int srcWidth, int
/* Create the mask for the source image */
int maskHdc = OS.CreateCompatibleDC(hDC);
- int maskBitmap = OS.CreateBitmap(srcWidth, srcHeight, 1, 1, null);
+ int maskBitmap = OS.CreateBitmap(imgWidth, imgHeight, 1, 1, null);
int oldMaskBitmap = OS.SelectObject(maskHdc, maskBitmap);
OS.SetBkColor(srcHdc, (transBlue << 16) | (transGreen << 8) | transRed);
- OS.BitBlt(maskHdc, 0, 0, srcWidth, srcHeight, srcHdc, 0, 0, OS.SRCCOPY);
+ OS.BitBlt(maskHdc, 0, 0, imgWidth, imgHeight, srcHdc, 0, 0, OS.SRCCOPY);
if (originalColors != null) OS.SetDIBColorTable(srcHdc, 0, 1 << bm.bmBitsPixel, originalColors);
/* Draw the source bitmap transparently using invert/and mask/invert */

Back to the top