Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiraj Modi2016-02-16 06:00:26 +0000
committerNiraj Modi2016-02-16 06:00:26 +0000
commitfb94b62508210477000e23f5d00e026a03a8a00c (patch)
treec57bb7d5cc3b2d05abe1a77ac7eac497a0e05165 /bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse
parentca815cd21572e20f1fadfa8c1a5fa668f2e3bd12 (diff)
downloadeclipse.platform.swt-fb94b62508210477000e23f5d00e026a03a8a00c.tar.gz
eclipse.platform.swt-fb94b62508210477000e23f5d00e026a03a8a00c.tar.xz
eclipse.platform.swt-fb94b62508210477000e23f5d00e026a03a8a00c.zip
Win32 (Part 4): Changing API's coordinate system from Pixels to Points.
- Fixed few methods in GC Change-Id: I8e7311d8a32248b305ded1c11ad30a295308ee08 Signed-off-by: Niraj Modi <niraj.modi@in.ibm.com>
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GC.java11
1 files changed, 9 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 24c3d5e4f3..737466c955 100644
--- 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
@@ -2047,8 +2047,15 @@ public void drawRectangleInPixels (int x, int y, int width, int height) {
* </ul>
*/
public void drawRectangle (Rectangle rect) {
+ rect = DPIUtil.autoScaleUp(rect, device);
+ drawRectangleInPixels(rect);
+}
+/**
+* @noreference This method is not intended to be referenced by clients.
+*/
+public void drawRectangleInPixels (Rectangle rect) {
if (rect == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
- drawRectangle (rect.x, rect.y, rect.width, rect.height);
+ drawRectangleInPixels (rect.x, rect.y, rect.width, rect.height);
}
/**
@@ -3501,7 +3508,7 @@ public int getCharWidth(char ch) {
* <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
* </ul>
*/
-public Rectangle getClippingInP () {
+public Rectangle getClipping () {
return DPIUtil.autoScaleDown(getClippingInPixels(), getDevice());
}
/**

Back to the top