diff options
author | Sebastian Ratz | 2018-08-30 15:11:39 +0000 |
---|---|---|
committer | Niraj Modi | 2018-11-15 12:54:26 +0000 |
commit | 14e35939a7ac301e05d1b8197575af4031effb36 (patch) | |
tree | 60a97fdf0b6e105f8a8d92d254e44c8fde236ccf | |
parent | 2982c4163ff033b48acfa8f9135083028f1a0900 (diff) | |
download | eclipse.platform.swt-14e35939a7ac301e05d1b8197575af4031effb36.tar.gz eclipse.platform.swt-14e35939a7ac301e05d1b8197575af4031effb36.tar.xz eclipse.platform.swt-14e35939a7ac301e05d1b8197575af4031effb36.zip |
Bug 538425 - Image#getImageData(zoom) implementation does not
auto-scale correctly on win32 and gtk
Signed-off-by: Sebastian Ratz <sebastian.ratz@sap.com>
Change-Id: I6d26e261d0c7d532ad72bd2814a5a659d31807c4
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java | 4 | ||||
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Image.java | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java index d415fe9a62..2abaa29789 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java @@ -1158,7 +1158,7 @@ public ImageData getImageData (int zoom) { return data; } // AutoScale the image at 100% zoom - return DPIUtil.autoScaleUp (device, data); + return DPIUtil.autoScaleImageData (device, data, zoom, 100); } else if (imageFileNameProvider != null) { boolean[] found = new boolean[1]; String fileName = DPIUtil.validateAndGetImagePathAtZoom (imageFileNameProvider, zoom, found); @@ -1167,7 +1167,7 @@ public ImageData getImageData (int zoom) { return new ImageData (fileName); } // AutoScale the image at 100% zoom - return DPIUtil.autoScaleUp (device, new ImageData (fileName)); + return DPIUtil.autoScaleImageData (device, new ImageData (fileName), zoom, 100); } else { return DPIUtil.autoScaleImageData (device, getImageDataAtCurrentZoom (), zoom, currentDeviceZoom); } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Image.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Image.java index 6faf7184a5..2d573083a2 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Image.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Image.java @@ -1380,7 +1380,7 @@ public ImageData getImageData (int zoom) { return data; } // AutoScale the image at 100% zoom - return DPIUtil.autoScaleUp (device, data); + return DPIUtil.autoScaleImageData (device, data, zoom, 100); } else if (imageFileNameProvider != null) { boolean[] found = new boolean[1]; String fileName = DPIUtil.validateAndGetImagePathAtZoom (imageFileNameProvider, zoom, found); @@ -1389,7 +1389,7 @@ public ImageData getImageData (int zoom) { return new ImageData (fileName); } // AutoScale the image at 100% zoom - return DPIUtil.autoScaleUp (device, new ImageData (fileName)); + return DPIUtil.autoScaleImageData (device, new ImageData (fileName), zoom, 100); } else { return DPIUtil.autoScaleImageData (device, getImageDataAtCurrentZoom (), zoom, currentDeviceZoom); } |