Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Northover2006-08-02 20:27:33 +0000
committerSteve Northover2006-08-02 20:27:33 +0000
commite7c6e7d11d56253213adca85a9e0af81956e78ac (patch)
treeeb6eaaddf431d8b34d248748b18ac17663b9f02d
parent08a67030eaaa3732e5f3fef624123f931b42ae42 (diff)
downloadeclipse.platform.swt-e7c6e7d11d56253213adca85a9e0af81956e78ac.tar.gz
eclipse.platform.swt-e7c6e7d11d56253213adca85a9e0af81956e78ac.tar.xz
eclipse.platform.swt-e7c6e7d11d56253213adca85a9e0af81956e78ac.zip
151893 - Issue with background images and CLabels [3.2.1]
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java
index 9ebf232d41..ca6ec6bf18 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java
@@ -1236,20 +1236,20 @@ LRESULT WM_PAINT (int wParam, int lParam) {
gc.setForeground (getForeground ());
gc.setBackground (getBackground ());
gc.setFont (getFont ());
+ OS.OffsetRgn (sysRgn, -ps.left, -ps.top);
+ OS.SelectClipRgn (gc.handle, sysRgn);
+ OS.OffsetRgn (sysRgn, ps.left, ps.top);
+ OS.SetMetaRgn (gc.handle);
+ OS.SetWindowOrgEx (gc.handle, ps.left, ps.top, null);
+ OS.SetBrushOrgEx (gc.handle, ps.left, ps.top, null);
if ((style & SWT.NO_BACKGROUND) != 0) {
/* This code is intentionally commented because it may be slow to copy bits from the screen */
//paintGC.copyArea (image, ps.left, ps.top);
} else {
RECT rect = new RECT ();
- OS.SetRect (rect, 0, 0, width, height);
+ OS.SetRect (rect, ps.left, ps.top, ps.right, ps.bottom);
drawBackground (gc.handle, rect);
}
- OS.OffsetRgn (sysRgn, -ps.left, -ps.top);
- OS.SelectClipRgn (gc.handle, sysRgn);
- OS.OffsetRgn (sysRgn, ps.left, ps.top);
- OS.SetMetaRgn (gc.handle);
- OS.SetWindowOrgEx (gc.handle, ps.left, ps.top, null);
- OS.SetBrushOrgEx (gc.handle, ps.left, ps.top, null);
}
Event event = new Event ();
event.gc = gc;

Back to the top