We have recently added a ZoomContext object that allows to track both a native and a target/device zoom to the Image class:
eclipse-platform/eclipse.platform.swt#2404
This extension has been adopted in GC to track and use separate zooms inside it's GCData as well (namely nativeZoom and imageZoom):
eclipse-platform/eclipse.platform.swt#2387
In order to streamline this, the GC/GCData shall be adapted to also make use of a ZoomContext object instead of containing two separate zoom values. It shall be validated whether it makes sense to add some zoom-specific functionality to ZoomContext as well (such as converting point/pixel values according to the zoom for specific contexts like fonts or images), such that consumers may access that functionality instead of the raw zoom values.
In any case, the ZoomContext inside Image will probably need to become a non-nested (SWT- and Win32-internal) type.
We have recently added a
ZoomContextobject that allows to track both a native and a target/device zoom to the Image class:eclipse-platform/eclipse.platform.swt#2404
This extension has been adopted in
GCto track and use separate zooms inside it'sGCDataas well (namelynativeZoomandimageZoom):eclipse-platform/eclipse.platform.swt#2387
In order to streamline this, the
GC/GCDatashall be adapted to also make use of aZoomContextobject instead of containing two separate zoom values. It shall be validated whether it makes sense to add some zoom-specific functionality toZoomContextas well (such as converting point/pixel values according to the zoom for specific contexts like fonts or images), such that consumers may access that functionality instead of the raw zoom values.In any case, the
ZoomContextinsideImagewill probably need to become a non-nested (SWT- and Win32-internal) type.