diff options
author | Sravan Kumar Lakkimsetti | 2016-05-23 17:55:03 +0000 |
---|---|---|
committer | Niraj Modi | 2016-05-24 17:01:42 +0000 |
commit | 916064708a285dbc8d069868f2e6a9128285c28e (patch) | |
tree | 3949f8b5aca70e7d93c44fa9df1338f9a0f4a5a7 /bundles/org.eclipse.swt/Eclipse SWT/cairo/org | |
parent | ded710fe048320769abd651856e0bb30d5b50363 (diff) | |
download | eclipse.platform.swt-916064708a285dbc8d069868f2e6a9128285c28e.tar.gz eclipse.platform.swt-916064708a285dbc8d069868f2e6a9128285c28e.tar.xz eclipse.platform.swt-916064708a285dbc8d069868f2e6a9128285c28e.zip |
Bug 494035 - [HiDpi] Rendering issues on Neon due to the new SWT
Auto-scaling feature on Windows and GTK platforms
- taken care of review comments
Change-Id: I4ae4f75eb89d44d6f6ae2b8b09031d98c51b4605
Signed-off-by: Sravan Kumar Lakkimsetti <sravankumarl@in.ibm.com>
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/cairo/org')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/cairo/org/eclipse/swt/graphics/Path.java | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cairo/org/eclipse/swt/graphics/Path.java b/bundles/org.eclipse.swt/Eclipse SWT/cairo/org/eclipse/swt/graphics/Path.java index 0855bbfe85..3ae25f4246 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/cairo/org/eclipse/swt/graphics/Path.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cairo/org/eclipse/swt/graphics/Path.java @@ -557,6 +557,12 @@ void getCurrentPointInPixels(float[] point) { */ public PathData getPathData() { if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); + PathData result = getPathDataInPixels(); + result.points = DPIUtil.autoScaleDown(result.points); + return result; +} + +PathData getPathDataInPixels() { long /*int*/ copy = Cairo.cairo_copy_path(handle); if (copy == 0) SWT.error(SWT.ERROR_NO_HANDLES); cairo_path_t path = new cairo_path_t(); @@ -726,16 +732,16 @@ void init(PathData data) { for (int i = 0, j = 0; i < types.length; i++) { switch (types[i]) { case SWT.PATH_MOVE_TO: - moveToInPixels(points[j++], points[j++]); + moveTo(points[j++], points[j++]); break; case SWT.PATH_LINE_TO: - lineToInPixels(points[j++], points[j++]); + lineTo(points[j++], points[j++]); break; case SWT.PATH_CUBIC_TO: - cubicToInPixels(points[j++], points[j++], points[j++], points[j++], points[j++], points[j++]); + cubicTo(points[j++], points[j++], points[j++], points[j++], points[j++], points[j++]); break; case SWT.PATH_QUAD_TO: - quadToInPixels(points[j++], points[j++], points[j++], points[j++]); + quadTo(points[j++], points[j++], points[j++], points[j++]); break; case SWT.PATH_CLOSE: close(); |