Skip to content

Commit 1ef7317

Browse files
committed
[Win32] Remove unused zoom parameter from CoordinateSystemMapper methods
The zoom parameter in some of the translation methods of the CoordinateSystemMappers and the according methods in Display is unused. This change simply removes the obsolete parameters.
1 parent 93c0ce9 commit 1ef7317

File tree

4 files changed

+20
-20
lines changed

4 files changed

+20
-20
lines changed

bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/CoordinateSystemMapper.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ interface CoordinateSystemMapper {
2727

2828
Rectangle mapMonitorBounds(Rectangle rectangle, int zoom);
2929

30-
Point translateFromDisplayCoordinates(Point point, int zoom);
30+
Point translateFromDisplayCoordinates(Point point);
3131

32-
Point translateToDisplayCoordinates(Point point, int zoom);
32+
Point translateToDisplayCoordinates(Point point);
3333

34-
Rectangle translateFromDisplayCoordinates(Rectangle rect, int zoom);
34+
Rectangle translateFromDisplayCoordinates(Rectangle rect);
3535

36-
Rectangle translateToDisplayCoordinates(Rectangle rect, int zoom);
36+
Rectangle translateToDisplayCoordinates(Rectangle rect);
3737

3838
Rectangle getContainingMonitorBoundsInPixels(Point point);
3939

bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3166,20 +3166,20 @@ Rectangle mapInPixels (Control from, Control to, int x, int y, int width, int he
31663166
return new Rectangle (rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top);
31673167
}
31683168

3169-
Point translateFromDisplayCoordinates(Point point, int zoom) {
3170-
return coordinateSystemMapper.translateFromDisplayCoordinates(point, zoom);
3169+
Point translateFromDisplayCoordinates(Point point) {
3170+
return coordinateSystemMapper.translateFromDisplayCoordinates(point);
31713171
}
31723172

3173-
Point translateToDisplayCoordinates(Point point, int zoom) {
3174-
return coordinateSystemMapper.translateToDisplayCoordinates(point, zoom);
3173+
Point translateToDisplayCoordinates(Point point) {
3174+
return coordinateSystemMapper.translateToDisplayCoordinates(point);
31753175
}
31763176

3177-
Rectangle translateFromDisplayCoordinates(Rectangle rect, int zoom) {
3178-
return coordinateSystemMapper.translateFromDisplayCoordinates(rect, zoom);
3177+
Rectangle translateFromDisplayCoordinates(Rectangle rect) {
3178+
return coordinateSystemMapper.translateFromDisplayCoordinates(rect);
31793179
}
31803180

3181-
Rectangle translateToDisplayCoordinates(Rectangle rect, int zoom) {
3182-
return coordinateSystemMapper.translateToDisplayCoordinates(rect, zoom);
3181+
Rectangle translateToDisplayCoordinates(Rectangle rect) {
3182+
return coordinateSystemMapper.translateToDisplayCoordinates(rect);
31833183
}
31843184

31853185
long messageProc (long hwnd, long msg, long wParam, long lParam) {

bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/MultiZoomCoordinateSystemMapper.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,24 +92,24 @@ public Rectangle mapMonitorBounds(Rectangle rect, int zoom) {
9292
}
9393

9494
@Override
95-
public Point translateFromDisplayCoordinates(Point point, int zoom) {
95+
public Point translateFromDisplayCoordinates(Point point) {
9696
return translateLocationInPixelsToPoints(point.x, point.y);
9797
}
9898

9999
@Override
100-
public Point translateToDisplayCoordinates(Point point, int zoom) {
100+
public Point translateToDisplayCoordinates(Point point) {
101101
Monitor monitor = point instanceof Point.WithMonitor pointWithMonitor ? pointWithMonitor.getMonitor() : null;
102102
return translateLocationInPointsToPixels(point.x, point.y, monitor);
103103
}
104104

105105
@Override
106-
public Rectangle translateFromDisplayCoordinates(Rectangle rect, int zoom) {
106+
public Rectangle translateFromDisplayCoordinates(Rectangle rect) {
107107
Monitor monitor = rect instanceof Rectangle.WithMonitor rectWithMonitor ? rectWithMonitor.getMonitor() : null;
108108
return translateRectangleInPixelsToPoints(rect.x, rect.y, rect.width, rect.height, monitor);
109109
}
110110

111111
@Override
112-
public Rectangle translateToDisplayCoordinates(Rectangle rect, int zoom) {
112+
public Rectangle translateToDisplayCoordinates(Rectangle rect) {
113113
Monitor monitor = rect instanceof Rectangle.WithMonitor rectWithMonitor ? rectWithMonitor.getMonitor() : null;
114114
return translateRectangleInPointsToPixels(rect.x, rect.y, rect.width, rect.height, monitor);
115115
}

bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/SingleZoomCoordinateSystemMapper.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,22 +76,22 @@ public Rectangle mapMonitorBounds(Rectangle rect, int zoom) {
7676
}
7777

7878
@Override
79-
public Point translateFromDisplayCoordinates(Point point, int zoom) {
79+
public Point translateFromDisplayCoordinates(Point point) {
8080
return Win32DPIUtils.pixelToPoint(point, DPIUtil.getDeviceZoom());
8181
}
8282

8383
@Override
84-
public Point translateToDisplayCoordinates(Point point, int zoom) {
84+
public Point translateToDisplayCoordinates(Point point) {
8585
return Win32DPIUtils.pointToPixel(point, DPIUtil.getDeviceZoom());
8686
}
8787

8888
@Override
89-
public Rectangle translateFromDisplayCoordinates(Rectangle rect, int zoom) {
89+
public Rectangle translateFromDisplayCoordinates(Rectangle rect) {
9090
return Win32DPIUtils.pixelToPoint(rect, DPIUtil.getDeviceZoom());
9191
}
9292

9393
@Override
94-
public Rectangle translateToDisplayCoordinates(Rectangle rect, int zoom) {
94+
public Rectangle translateToDisplayCoordinates(Rectangle rect) {
9595
return Win32DPIUtils.pointToPixel(rect, DPIUtil.getDeviceZoom());
9696
}
9797

0 commit comments

Comments
 (0)