Skip to content

Commit 925a294

Browse files
akoch-yattaHeikoKlare
authored andcommitted
[win32] Adapt GC zoom when using plain images
This commit adapts the zoom passed to the GC when it is initialized for a plain Image created via Image#Image(Device, int, int) with a given width and height. It will fall back to DPIUtil#getDeviceZoom() again to revert to original bevahiour and prevent blurry rescaling of old usages.
1 parent 9d3227d commit 925a294

File tree

1 file changed

+5
-0
lines changed
  • bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics

1 file changed

+5
-0
lines changed

bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Image.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2107,6 +2107,11 @@ public Collection<Integer> getPreservedZoomLevels() {
21072107
return Collections.singleton(baseZoom);
21082108
}
21092109

2110+
@Override
2111+
protected long configureGCData(GCData data) {
2112+
return configureGC(data, DPIUtil.getDeviceZoom());
2113+
}
2114+
21102115
@Override
21112116
protected Rectangle getBounds(int zoom) {
21122117
Rectangle rectangle = new Rectangle(0, 0, width, height);

0 commit comments

Comments
 (0)