Skip to content

Commit 756c584

Browse files
committed
Update change-log and documentation regarding improved HighDPI support
1 parent 9e112ba commit 756c584

File tree

5 files changed

+540
-6
lines changed

5 files changed

+540
-6
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@
77

88
## Zest
99

10+
## General
1011

12+
- Experimental: The native HighDPI scaling provided by SWT can be replaced with a Draw2D-based scaling may by setting
13+
the `*draw2d.enableAutoscale*` to `*true*`. Doing so avoids visual artifacts that result from
14+
fractional scaling. This property is only available on Windows and enabled by default.
1115

1216
# GEF Classic 3.25.0
1317

org.eclipse.gef.doc.isv/guide-src/guide.adoc

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ endif::[]
2020
* xref:#tools-and-the-palette[Tools and Palette]
2121
* xref:#types-of-interactions-in-gef[Interactions] - the GEF interactions and
2222
the players involved
23+
* xref:#highdpi-support[HighDPI Support]
2324

2425
=== [#overview]#Overview#
2526

@@ -1068,4 +1069,21 @@ connection to avoid figures. The handles for creating and moving
10681069
bendpoints are labeled with the index that the BendpointRequest will
10691070
contain. The index is the same as the current (or eventual) index of the
10701071
bendpoint in the routing constraint's List.
1071-
|===
1072+
|===
1073+
1074+
=== [#highdpi-support]#HighDPI Support#
1075+
1076+
The `*Figures*` used for visualization of the `*EditParts*` are painted using absolute coordinates. When used in
1077+
combination with fractional scaling, the resulting rounding errors may cause glitches and other visual artifacts in the
1078+
editor. GEF provides an experimental mode, where the scaling is not done by SWT, but rather by Draw2D.
1079+
1080+
By setting the `*draw2d.enableAutoscale*` system property, the native auto-scaling functionality of the `*Canvas*`,
1081+
which is normally provided by SWT, is replaced by a Draw2D-based scaling. A `*ZoomChanged*` is hooked to the
1082+
`*EditPartViewer*`, listening to changes to the `*monitorScale*` of the underlying `*Control*` and setting the current
1083+
zoom as property of the viewer. The `*RootEditPart*` listens to changes of this property and updates the scale of its
1084+
`*ScalableFigure*`.
1085+
1086+
image:images/highdpi.svg[Relation between the FigureCanvas, EditPartViewer and RootEditPart with respect to the device zoom]
1087+
1088+
image:images/important.gif[image] Fractional scaling is currently only supported for Windows, where this system property
1089+
is enabled by default. On Linux and MacOS, this system property is ignored.

0 commit comments

Comments
 (0)