@@ -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
10681069bendpoints are labeled with the index that the BendpointRequest will
10691070contain. The index is the same as the current (or eventual) index of the
10701071bendpoint 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