summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Northover <steve>2005-06-07 18:50:38 +0000
committerSteve Northover <steve>2005-06-07 18:50:38 +0000
commit554c00a18df0d0c1a87f83c614fa4bb098dc894f (patch)
treeb12b9f4e6c69b83b86f08a016a3bb3a1bdfb2224
parent70e248bf5ea827d3db067893f71e76d06f5846cf (diff)
downloadeclipse.platform.swt-554c00a18df0d0c1a87f83c614fa4bb098dc894f.tar.gz
eclipse.platform.swt-554c00a18df0d0c1a87f83c614fa4bb098dc894f.tar.xz
eclipse.platform.swt-554c00a18df0d0c1a87f83c614fa4bb098dc894f.zip
make calls to OffsetRgn() consistent
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GC.java10
1 files changed, 5 insertions, 5 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 0cee8a6d39..536ffc18ea 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
@@ -2711,7 +2711,7 @@ public void getClipping (Region region) {
OS.GetClipBox(handle, rect);
OS.SetRectRgn(region.handle, rect.left, rect.top, rect.right, rect.bottom);
} else {
- if (pt.x != 0 || pt.y != 0) OS.OffsetRgn (region.handle, pt.x, pt.y);
+ OS.OffsetRgn (region.handle, pt.x, pt.y);
}
if (!OS.IsWinCE) {
int metaRgn = OS.CreateRectRgn (0, 0, 0, 0);
@@ -2722,7 +2722,7 @@ public void getClipping (Region region) {
OS.DeleteObject(metaRgn);
int flags = 0;
if (OS.WIN32_VERSION >= OS.VERSION(4, 10)) {
- flags = OS.GetLayout(handle);
+ flags = OS.GetLayout(handle);
}
int hwnd = data.hwnd;
if (hwnd != 0 && data.ps != null && (flags & OS.LAYOUT_RTL) == 0) {
@@ -3176,7 +3176,7 @@ void initGdip(boolean draw, boolean fill) {
int result = OS.GetClipRgn(handle, hRgn);
POINT pt = new POINT ();
OS.GetWindowOrgEx (handle, pt);
- if (pt.x != 0 || pt.y != 0) OS.OffsetRgn (hRgn, pt.x, pt.y);
+ OS.OffsetRgn (hRgn, pt.x, pt.y);
OS.SelectClipRgn(handle, 0);
gdipGraphics = data.gdipGraphics = Gdip.Graphics_new(handle);
if (gdipGraphics == 0) SWT.error(SWT.ERROR_NO_HANDLES);
@@ -3506,10 +3506,10 @@ void setClipping(int clipRgn) {
if (hRgn != 0) {
pt = new POINT ();
OS.GetWindowOrgEx (handle, pt);
- if (pt.x != 0 || pt.y != 0) OS.OffsetRgn (hRgn, -pt.x, -pt.y);
+ OS.OffsetRgn (hRgn, -pt.x, -pt.y);
}
OS.SelectClipRgn(handle, hRgn);
- if (hRgn != 0 && (pt.x != 0 || pt.y != 0)) OS.OffsetRgn (hRgn, pt.x, pt.y);
+ if (hRgn != 0) OS.OffsetRgn (hRgn, pt.x, pt.y);
}
if (hRgn != 0 && hRgn != clipRgn) {
OS.DeleteObject(hRgn);