From 7e8218163f77a0d03fc2d73b5e1ce40133b95d37 Mon Sep 17 00:00:00 2001 From: Phillipus
* WARNING: This class is not intended to be subclassed. */ -@SuppressWarnings({"rawtypes", "unchecked", "restriction"}) +@SuppressWarnings({"rawtypes", "unchecked"}) public class SWTGraphics extends Graphics { private double scale = 1.0; @@ -1286,21 +1286,7 @@ public void setInterpolation(int interpolation) { @Override public void setLineAttributes(LineAttributes lineAttributes) { - setLineAttributes(lineAttributes, true); - } - - public void setLineAttributes(LineAttributes lineAttributes, boolean adjustForWindowsHiDPI) { copyLineAttributes(currentState.lineAttributes, lineAttributes); - - /* - * Hack to workaround bug on Windows 200% scaling where dashes are half size - * See https://github.com/eclipse-platform/eclipse.platform.swt/issues/687 - */ - if(adjustForWindowsHiDPI && currentState.lineAttributes.dash != null && "win32".equals(SWT.getPlatform())) { //$NON-NLS-1$ - for(int i = 0; i < currentState.lineAttributes.dash.length; i++) { - currentState.lineAttributes.dash[i] *= org.eclipse.swt.internal.DPIUtil.getDeviceZoom() / 100; - } - } } /** @@ -1332,10 +1318,6 @@ public void setLineDash(int[] dashes) { */ @Override public void setLineDash(float[] value) { - setLineDash(value, true); - } - - public void setLineDash(float[] value, boolean adjustForWindowsHiDPI) { if (value != null) { // validate dash values for (int i = 0; i < value.length; i++) { @@ -1343,16 +1325,6 @@ public void setLineDash(float[] value, boolean adjustForWindowsHiDPI) { SWT.error(SWT.ERROR_INVALID_ARGUMENT); } } - - /* - * Hack to workaround bug on Windows 200% scaling where dashes are half size - * See https://github.com/eclipse-platform/eclipse.platform.swt/issues/687 - */ - if(adjustForWindowsHiDPI && "win32".equals(SWT.getPlatform())) { //$NON-NLS-1$ - for(int i = 0; i < value.length; i++) { - value[i] *= org.eclipse.swt.internal.DPIUtil.getDeviceZoom() / 100; - } - } currentState.lineAttributes.dash = value.clone(); currentState.lineAttributes.style = SWT.LINE_CUSTOM;