| Summary: | Refine HiDPI Support | ||
|---|---|---|---|
| Product: | [JogAmp] Jogl | Reporter: | Sven Gothel <sgothel> |
| Component: | core | Assignee: | Sven Gothel <sgothel> |
| Status: | RESOLVED FIXED | ||
| Severity: | enhancement | CC: | askinner, sgothel |
| Priority: | --- | ||
| Version: | 2.3.0 | ||
| Hardware: | All | ||
| OS: | all | ||
| Type: | --- | SCM Refs: |
1341fe0216e4f12d7243e98290cc97824b1c0b5c
6516a52d3da5cced924db63b64af911d55355325
|
| Workaround: | --- | ||
| Bug Depends on: | |||
| Bug Blocks: | 1373 | ||
|
Description
Sven Gothel
2015-01-23 01:18:14 CET
(In reply to comment #0) > - Standalone NativeWindow getScale/convert method w/o window creation. > Here a given rectangular area shall be used to query the > return the monitor/screen index with highest coverage > and its pixel-scale. > > - Use fractional scale > > - Figure out how to receive pixel accurate mouse coordinates > from mouse events on (OSX, AWT + NEWT) > > - Figure out how to round a fractional scale conversion > and avoid distortion scaling pixel-viewport <-> window-viewport - Also ensure a change of pixel-size will be propagated to AWT elements. Note: On NEWT this feature already works. 1341fe0216e4f12d7243e98290cc97824b1c0b5c Add OSXUtil.GetPixelScale(final RectangleImmutable r, final int[] screenIndexOut) commit 6516a52d3da5cced924db63b64af911d55355325:
- Use float[2] for pixel-scale.
Utilize simple integer rounding:
int-pixel-units = (int) ( int-window-units * pixel-scale + 0.5f )
- Provide minimum and maximum allowed pixel-scale values
to be set by platform, supporting generic pixel-scale validation.
- Remove 'OSXUtil.GetPixelScale(final RectangleImmutable r, final int[] screenIndexOut)',
implementation for all platforms would cause huge redundancy of
Screen and MonitorDevice code (duplication of NEWT).
- instead, add 'float[2] pixelScale' to NEWT's MonitorDevice
- Detect change of pixel-scale and propagate accordingly.
This allows GLCanvas, GLJPanel and NewtCanvasAWT instances
to be dragged between monitor devices w/ different pixel-scale.
- OSX: Handle native triggered reshape events off-thread to avoid EDT congestion
due to locked window when consuming deferred events on EDT.
|