diff options
author | Grant Gayed <ggayed> | 2008-07-31 15:44:54 +0000 |
---|---|---|
committer | Grant Gayed <ggayed> | 2008-07-31 15:44:54 +0000 |
commit | 50b584631690d5c2c8ad5fdd401f2599d4e81bd7 (patch) | |
tree | 49b940acca4155c7997e35f6eb8be692b5577951 /bundles | |
parent | 3ead8eac7890510dfcd7f5951a990db354ddb856 (diff) | |
download | eclipse.platform.swt-50b584631690d5c2c8ad5fdd401f2599d4e81bd7.tar.gz eclipse.platform.swt-50b584631690d5c2c8ad5fdd401f2599d4e81bd7.tar.xz eclipse.platform.swt-50b584631690d5c2c8ad5fdd401f2599d4e81bd7.zip |
242484 - Rectangle.contains(int, int) returns incorrect results
Diffstat (limited to 'bundles')
-rwxr-xr-x | bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/Rectangle.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/Rectangle.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/Rectangle.java index 9004086c6f..c09e15f454 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/Rectangle.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/Rectangle.java @@ -120,7 +120,7 @@ public void add (Rectangle rect) { * @return <code>true</code> if the rectangle contains the point and <code>false</code> otherwise */ public boolean contains (int x, int y) { - return (x >= this.x) && (y >= this.y) && ((x - this.x) < width) && ((y - this.y) < height); + return (x >= this.x) && (y >= this.y) && x < (this.x + width) && y < (this.y + height); } /** |