|
JOGL v2.6.0-rc-20250706
JOGL, High-Performance Graphics Binding for Java (public API).
|
Adding mutable surface pixel scale property to implementing class, usually to a NativeSurface implementation, see setSurfaceScale(float[]).
More...
Public Member Functions | |
| boolean | canSetSurfaceScale () |
Returns true if setSurfaceScale(float[]) is supported, otherwise false. More... | |
| boolean | setSurfaceScale (final float[] pixelScale) |
Request a pixel scale in x- and y-direction for the associated NativeSurface, where size_in_pixel_units = pixel_scale * size_in_window_units. More... | |
| float[] | getRequestedSurfaceScale (final float[] result) |
Returns the requested pixel scale of the associated NativeSurface. More... | |
| float[] | getCurrentSurfaceScale (final float[] result) |
Returns the current pixel scale of the associated NativeSurface. More... | |
| float[] | getMinimumSurfaceScale (final float[] result) |
Returns the minimum pixel scale of the associated NativeSurface. More... | |
| float[] | getMaximumSurfaceScale (final float[] result) |
Returns the maximum pixel scale of the associated NativeSurface. More... | |
Static Public Attributes | |
| static final float | IDENTITY_PIXELSCALE = 1f |
| Setting surface-pixel-scale of {@value}, results in same pixel- and window-units. More... | |
| static final float | AUTOMAX_PIXELSCALE = 0f |
| Setting surface-pixel-scale of {@value}, results in maximum platform dependent pixel-scale, i.e. More... | |
Adding mutable surface pixel scale property to implementing class, usually to a NativeSurface implementation, see setSurfaceScale(float[]).
Definition at line 35 of file ScalableSurface.java.
| boolean com.jogamp.nativewindow.ScalableSurface.canSetSurfaceScale | ( | ) |
Returns true if setSurfaceScale(float[]) is supported, otherwise false.
For pure downstream scalable surfaces like AWT widgets, setting the picel scale is not supported since the pixel scale is set by the underlying toolkit.
Implemented in com.jogamp.opengl.awt.GLCanvas, com.jogamp.opengl.awt.GLJPanel, com.jogamp.nativewindow.awt.JAWTWindow, and com.jogamp.newt.opengl.GLWindow.
| float[] com.jogamp.nativewindow.ScalableSurface.getCurrentSurfaceScale | ( | final float[] | result | ) |
Returns the current pixel scale of the associated NativeSurface.
| result | float[2] storage for the result |
Implemented in com.jogamp.opengl.awt.GLCanvas, com.jogamp.opengl.awt.GLJPanel, com.jogamp.nativewindow.awt.JAWTWindow, and com.jogamp.newt.opengl.GLWindow.
| float[] com.jogamp.nativewindow.ScalableSurface.getMaximumSurfaceScale | ( | final float[] | result | ) |
Returns the maximum pixel scale of the associated NativeSurface.
The maximum pixel scale maybe used to determine the proper dpi value of the monitor displaying this NativeSurface.
surfacePpMM = monitorPpMM * currentSurfaceScale / nativeSurfaceScale, with PpMM == pixel per millimeter
| result | float[2] storage for the result |
Implemented in com.jogamp.opengl.awt.GLCanvas, com.jogamp.opengl.awt.GLJPanel, com.jogamp.nativewindow.awt.JAWTWindow, and com.jogamp.newt.opengl.GLWindow.
| float[] com.jogamp.nativewindow.ScalableSurface.getMinimumSurfaceScale | ( | final float[] | result | ) |
Returns the minimum pixel scale of the associated NativeSurface.
| result | float[2] storage for the result |
Implemented in com.jogamp.opengl.awt.GLCanvas, com.jogamp.opengl.awt.GLJPanel, com.jogamp.nativewindow.awt.JAWTWindow, and com.jogamp.newt.opengl.GLWindow.
| float[] com.jogamp.nativewindow.ScalableSurface.getRequestedSurfaceScale | ( | final float[] | result | ) |
Returns the requested pixel scale of the associated NativeSurface.
If canSetSurfaceScale() returns false, requested pixel scale is AUTOMAX_PIXELSCALE and immutable.
| result | float[2] storage for the result |
Implemented in com.jogamp.opengl.awt.GLCanvas, com.jogamp.opengl.awt.GLJPanel, com.jogamp.nativewindow.awt.JAWTWindow, and com.jogamp.newt.opengl.GLWindow.
| boolean com.jogamp.nativewindow.ScalableSurface.setSurfaceScale | ( | final float[] | pixelScale | ) |
Request a pixel scale in x- and y-direction for the associated NativeSurface, where size_in_pixel_units = pixel_scale * size_in_window_units.
Default pixel scale request for both directions is AUTOMAX_PIXELSCALE.
If canSetSurfaceScale() returns false, requested pixel scale is AUTOMAX_PIXELSCALE, immutable and method returns false.
In case platform only supports uniform pixel scale, i.e. one scale for both directions, either AUTOMAX_PIXELSCALE or the maximum requested pixel scale component is used.
The requested pixel scale will be validated against platform limits before native scale-setup, i.e. clipped to IDENTITY_PIXELSCALE if not supported or clipped to the platform maximum. It can be queried via getRequestedSurfaceScale(float[]).
The actual realized pixel scale values of the NativeSurface can be queried via getCurrentSurfaceScale(float[]) or computed via surface. convertToPixelUnits(new int[] { 1, 1 })
| pixelScale | requested surface pixel scale float[2] values for x- and y-direction. |
true if the current pixel scale has changed, otherwise false. Implemented in com.jogamp.opengl.awt.GLCanvas, com.jogamp.opengl.awt.GLJPanel, com.jogamp.nativewindow.awt.JAWTWindow, and com.jogamp.newt.opengl.GLWindow.
|
static |
Setting surface-pixel-scale of {@value}, results in maximum platform dependent pixel-scale, i.e.
pixel-units >> window-units where available.
Definition at line 39 of file ScalableSurface.java.
|
static |
Setting surface-pixel-scale of {@value}, results in same pixel- and window-units.
Definition at line 37 of file ScalableSurface.java.