|
39 | 39 | * <P>
|
40 | 40 | * WARNING: This class is not intended to be subclassed.
|
41 | 41 | */
|
42 |
| -@SuppressWarnings({"rawtypes", "unchecked", "restriction"}) |
| 42 | +@SuppressWarnings({"rawtypes", "unchecked"}) |
43 | 43 | public class SWTGraphics extends Graphics {
|
44 | 44 |
|
45 | 45 | private double scale = 1.0;
|
@@ -1286,21 +1286,7 @@ public void setInterpolation(int interpolation) {
|
1286 | 1286 |
|
1287 | 1287 | @Override
|
1288 | 1288 | public void setLineAttributes(LineAttributes lineAttributes) {
|
1289 |
| - setLineAttributes(lineAttributes, true); |
1290 |
| - } |
1291 |
| - |
1292 |
| - public void setLineAttributes(LineAttributes lineAttributes, boolean adjustForWindowsHiDPI) { |
1293 | 1289 | copyLineAttributes(currentState.lineAttributes, lineAttributes);
|
1294 |
| - |
1295 |
| - /* |
1296 |
| - * Hack to workaround bug on Windows 200% scaling where dashes are half size |
1297 |
| - * See https://github.com/eclipse-platform/eclipse.platform.swt/issues/687 |
1298 |
| - */ |
1299 |
| - if(adjustForWindowsHiDPI && currentState.lineAttributes.dash != null && "win32".equals(SWT.getPlatform())) { //$NON-NLS-1$ |
1300 |
| - for(int i = 0; i < currentState.lineAttributes.dash.length; i++) { |
1301 |
| - currentState.lineAttributes.dash[i] *= org.eclipse.swt.internal.DPIUtil.getDeviceZoom() / 100; |
1302 |
| - } |
1303 |
| - } |
1304 | 1290 | }
|
1305 | 1291 |
|
1306 | 1292 | /**
|
@@ -1332,27 +1318,13 @@ public void setLineDash(int[] dashes) {
|
1332 | 1318 | */
|
1333 | 1319 | @Override
|
1334 | 1320 | public void setLineDash(float[] value) {
|
1335 |
| - setLineDash(value, true); |
1336 |
| - } |
1337 |
| - |
1338 |
| - public void setLineDash(float[] value, boolean adjustForWindowsHiDPI) { |
1339 | 1321 | if (value != null) {
|
1340 | 1322 | // validate dash values
|
1341 | 1323 | for (int i = 0; i < value.length; i++) {
|
1342 | 1324 | if (value[i] <= 0) {
|
1343 | 1325 | SWT.error(SWT.ERROR_INVALID_ARGUMENT);
|
1344 | 1326 | }
|
1345 | 1327 | }
|
1346 |
| - |
1347 |
| - /* |
1348 |
| - * Hack to workaround bug on Windows 200% scaling where dashes are half size |
1349 |
| - * See https://github.com/eclipse-platform/eclipse.platform.swt/issues/687 |
1350 |
| - */ |
1351 |
| - if(adjustForWindowsHiDPI && "win32".equals(SWT.getPlatform())) { //$NON-NLS-1$ |
1352 |
| - for(int i = 0; i < value.length; i++) { |
1353 |
| - value[i] *= org.eclipse.swt.internal.DPIUtil.getDeviceZoom() / 100; |
1354 |
| - } |
1355 |
| - } |
1356 | 1328 |
|
1357 | 1329 | currentState.lineAttributes.dash = value.clone();
|
1358 | 1330 | currentState.lineAttributes.style = SWT.LINE_CUSTOM;
|
|
0 commit comments