Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Northover2006-08-02 19:36:57 +0000
committerSteve Northover2006-08-02 19:36:57 +0000
commita9de84c73dac1498f19dd852bb2b6d33bfa5fdba (patch)
tree9cbb19b02c48146725491dc3ce9fb222924e8242 /bundles
parenta06ac5b2fbfe2a36939378719c1e2bf8050edcfb (diff)
downloadeclipse.platform.swt-a9de84c73dac1498f19dd852bb2b6d33bfa5fdba.tar.gz
eclipse.platform.swt-a9de84c73dac1498f19dd852bb2b6d33bfa5fdba.tar.xz
eclipse.platform.swt-a9de84c73dac1498f19dd852bb2b6d33bfa5fdba.zip
151893 - Issue with background images and CLabels
Diffstat (limited to 'bundles')
-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 73818a4e39..7e75329f30 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