UnstableChanges

Summary

  1. Nativewindow Rectangle*: Cleanup up union(..), intersection(..): Return a new Rectangle instance (mutable) (details)
  2. Bug 1422: Emulate DPI Scaling on non-native DPI autoscale platforms (!MacOS) (details)
Commit 9bcc384e66e40706225b86e9750c5822cb8f8c57 by Sven Gothel
Nativewindow Rectangle*: Cleanup up union(..), intersection(..): Return a new Rectangle instance (mutable)

Also return 'this' for setter methods for chaining.
The file was modifiedsrc/nativewindow/classes/com/jogamp/nativewindow/util/Rectangle.java (diff)
The file was modifiedsrc/nativewindow/classes/com/jogamp/nativewindow/util/RectangleImmutable.java (diff)
Commit d671b2ab3badbcfdbe0ff57f55ff997ba7bcb060 by Sven Gothel
Bug 1422: Emulate DPI Scaling on non-native DPI autoscale platforms (!MacOS)

Bug 1422 shows that it seems to be desired to emulate DPI scaling where
the native toolkit does not implmement the same.

On GTK, DPIUtil.mapDPIToZoom (int dpi) reads:
  double zoom = (double) dpi * 100 / 96;
  int roundedZoom = (int) Math.round (zoom);
  return roundedZoom;

While having dpi calculated as:

  dpi = 96 * GDK.gdk_monitor_get_scale_factor(monitor);

Well, this seems to exist to allow 96 dpi fixed layout to
'look' OK on high-dpi screens.
However, you get in trouble if you layout high-dpi aware,
i.e. using percentages etc.

There is one exception: If DPIUtil.useCairoAutoScale() is true, scalingFactor is 1f
and hence the scaling emulation dropped.

'DPIUtil.setUseCairoAutoScale((sx[0]*100) == scaleFactor || OS.isGNOME);'
The file was modifiedsrc/newt/classes/com/jogamp/newt/swt/NewtCanvasSWT.java (diff)
The file was modifiedsrc/nativewindow/classes/com/jogamp/nativewindow/swt/SWTAccessor.java (diff)
The file was modifiedsrc/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWTAccessor02NewtGLWindow.java (diff)
The file was modifiedsrc/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWTAccessor03AWTGLn.java (diff)
The file was modifiedsrc/test/com/jogamp/opengl/test/junit/jogl/swt/TestGLCanvasSWTNewtCanvasSWTPosInTabs.java (diff)
The file was modifiedsrc/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWTAccessor01.java (diff)