|
JOGL v2.6.0-rc-20250706
JOGL, High-Performance Graphics Binding for Java (public API).
|
Visual output device, i.e. More...
Classes | |
| enum | Orientation |
Public Member Functions | |
| final Orientation | getOrientationTo (final MonitorDevice other, final int move_diff[]) |
| Returns the orientation of this monitor to the other. More... | |
| final Screen | getScreen () |
Returns the Screen owning this monitor. More... | |
| final boolean | equals (final Object obj) |
Tests equality of two MonitorDevice objects by evaluating equality of it's components:More... | |
| final int | hashCode () |
| Returns a combined hash code of it's elements: More... | |
| final long | getHandle () |
| final int | getId () |
| final String | getName () |
| final boolean | isClone () |
| final boolean | isPrimary () |
Returns true if this device represents the primary device, otherwise return false. More... | |
| final DimensionImmutable | getSizeMM () |
| final float[] | getPixelsPerMM (final float[] ppmmStore) |
Returns the pixels per millimeter value according to the current mode's surface resolution. More... | |
| final float[] | getPixelsPerMM (final MonitorMode mode, final float[] ppmmStore) |
Returns the pixels per millimeter value according to the given mode's surface resolution. More... | |
| final MonitorMode | getOriginalMode () |
Returns the immutable original com.jogamp.newt.MonitorMode, as used at NEWT initialization. More... | |
| final List< MonitorMode > | getSupportedModes () |
Returns a list of immutable MonitorModes supported by this monitor. More... | |
| final RectangleImmutable | getViewport () |
Returns the current rectangular portion of the rotated virtual Screen size in pixel units represented by this monitor, i.e. More... | |
| final RectangleImmutable | getViewportInWindowUnits () |
Returns the current rectangular portion of the rotated virtual Screen size in window units represented by this monitor, i.e. More... | |
| float[] | getPixelScale (final float[] result) |
| Returns the current rotated pixel-scale of this monitor, i.e. More... | |
| final boolean | contains (final int x, final int y) |
Returns true if given screen coordinates in pixel units are contained by this viewport, otherwise false. More... | |
| final boolean | isOriginalMode () |
| final boolean | isModeChangedByUs () |
Returns true</true> if the More... | |
| final MonitorMode | getCurrentMode () |
Returns the cached current MonitorMode w/o native query. More... | |
| abstract MonitorMode | queryCurrentMode () throws IllegalStateException |
Returns the current MonitorMode resulting from a native query. More... | |
| abstract boolean | setCurrentMode (MonitorMode mode) throws IllegalStateException |
Set the current com.jogamp.newt.MonitorMode. More... | |
| String | toString () |
Static Public Member Functions | |
| static float[] | perMMToPerInch (final float[] ppmm) |
| Converts [1/mm] to [1/inch] in place. More... | |
| static void | unionOfViewports (final Rectangle viewport, final Rectangle viewportInWindowUnits, final List< MonitorDevice > monitors) |
Calculates the union of the given monitor's viewport in pixel- and window units. More... | |
Protected Member Functions | |
| MonitorDevice (final Screen screen, final long nativeHandle, final int nativeId, final String name, final boolean isClone, final boolean isPrimary, final DimensionImmutable sizeMM, final MonitorMode currentMode, final float[] pixelScale, final Rectangle viewportPU, final Rectangle viewportWU, final ArrayHashSet< MonitorMode > supportedModes) | |
Protected Attributes | |
| final Screen | screen |
| final long | nativeHandle |
| final int | nativeId |
| final String | name |
| final DimensionImmutable | sizeMM |
| final MonitorMode | originalMode |
| final ArrayHashSet< MonitorMode > | supportedModes |
| final float[] | pixelScale |
| final Rectangle | viewportPU |
| final Rectangle | viewportWU |
| boolean | isClone |
| boolean | isPrimary |
| MonitorMode | currentMode |
| boolean | modeChanged |
Visual output device, i.e.
a CRT, LED ..consisting of it's components:
<ui> Immutable
DimensionImmutable size in [mm] MonitorMode original mode List<MonitorMode> supportedModes Mutable
MonitorMode current mode RectangleImmutable viewport (rotated) All values of this interface are represented in pixel units, if not stated otherwise.
Definition at line 61 of file MonitorDevice.java.
|
protected |
| screen | associated Screen |
| nativeHandle | unique monitor device long handle, implementation specific |
| nativeId | unique monitor device integer Id, implementation specific |
| name | optional monitor name, maybe null |
| isClone | flag |
| isPrimary | flag |
| sizeMM | size in millimeters |
| currentMode | |
| pixelScale | pre-fetched current pixel-scale, maybe null for ScalableSurface#IDENTITY_PIXELSCALE. |
| viewportPU | viewport in pixel-units |
| viewportWU | viewport in window-units |
| supportedModes | all supported MonitorModes |
Definition at line 145 of file MonitorDevice.java.
| final boolean com.jogamp.newt.MonitorDevice.contains | ( | final int | x, |
| final int | y | ||
| ) |
Returns true if given screen coordinates in pixel units are contained by this viewport, otherwise false.
| x | x-coord in pixel units |
| y | y-coord in pixel units |
Definition at line 337 of file MonitorDevice.java.
| final boolean com.jogamp.newt.MonitorDevice.equals | ( | final Object | obj | ) |
Tests equality of two MonitorDevice objects by evaluating equality of it's components:
nativeID
Definition at line 184 of file MonitorDevice.java.
| final MonitorMode com.jogamp.newt.MonitorDevice.getCurrentMode | ( | ) |
Returns the cached current MonitorMode w/o native query.
The returned MonitorMode is element of the lists getSupportedModes() and Screen#getMonitorModes().
Definition at line 402 of file MonitorDevice.java.
| final long com.jogamp.newt.MonitorDevice.getHandle | ( | ) |
Definition at line 205 of file MonitorDevice.java.
| final int com.jogamp.newt.MonitorDevice.getId | ( | ) |
Definition at line 208 of file MonitorDevice.java.
| final String com.jogamp.newt.MonitorDevice.getName | ( | ) |
Definition at line 211 of file MonitorDevice.java.
| final Orientation com.jogamp.newt.MonitorDevice.getOrientationTo | ( | final MonitorDevice | other, |
| final int | move_diff[] | ||
| ) |
Returns the orientation of this monitor to the other.
| other | the other monitor |
| move_diff | int[2] to store the move delta for each axis from this-monitor to the other. |
Definition at line 97 of file MonitorDevice.java.
| final MonitorMode com.jogamp.newt.MonitorDevice.getOriginalMode | ( | ) |
Returns the immutable original com.jogamp.newt.MonitorMode, as used at NEWT initialization.
The returned MonitorMode is element of the lists getSupportedModes() and Screen#getMonitorModes().
Definition at line 279 of file MonitorDevice.java.
| float[] com.jogamp.newt.MonitorDevice.getPixelScale | ( | final float[] | result | ) |
Returns the current rotated pixel-scale of this monitor, i.e.
horizontal and vertical.
Definition at line 326 of file MonitorDevice.java.
| final float[] com.jogamp.newt.MonitorDevice.getPixelsPerMM | ( | final float[] | ppmmStore | ) |
Returns the pixels per millimeter value according to the current mode's surface resolution.
To convert the result to dpi, i.e. dots-per-inch, multiply both components with 25.4f, see perMMToPerInch(float[]).
| ppmmStore | float[2] storage for the ppmm result |
Definition at line 240 of file MonitorDevice.java.
| final float[] com.jogamp.newt.MonitorDevice.getPixelsPerMM | ( | final MonitorMode | mode, |
| final float[] | ppmmStore | ||
| ) |
Returns the pixels per millimeter value according to the given mode's surface resolution.
To convert the result to dpi, i.e. dots-per-inch, multiply both components with 25.4f.
| mode | |
| ppmmStore | float[2] storage for the ppmm result |
Definition at line 254 of file MonitorDevice.java.
| final Screen com.jogamp.newt.MonitorDevice.getScreen | ( | ) |
Returns the Screen owning this monitor.
Definition at line 171 of file MonitorDevice.java.
| final DimensionImmutable com.jogamp.newt.MonitorDevice.getSizeMM | ( | ) |
Definition at line 225 of file MonitorDevice.java.
| final List< MonitorMode > com.jogamp.newt.MonitorDevice.getSupportedModes | ( | ) |
Returns a list of immutable MonitorModes supported by this monitor.
The list is ordered in descending order, see MonitorMode#compareTo(MonitorMode).
Use w/ care, it's not a copy!
Definition at line 293 of file MonitorDevice.java.
| final RectangleImmutable com.jogamp.newt.MonitorDevice.getViewport | ( | ) |
Returns the current rectangular portion of the rotated virtual Screen size in pixel units represented by this monitor, i.e.
top-left origin and size.
Definition at line 304 of file MonitorDevice.java.
| final RectangleImmutable com.jogamp.newt.MonitorDevice.getViewportInWindowUnits | ( | ) |
Returns the current rectangular portion of the rotated virtual Screen size in window units represented by this monitor, i.e.
top-left origin and size.
Definition at line 315 of file MonitorDevice.java.
| final int com.jogamp.newt.MonitorDevice.hashCode | ( | ) |
Returns a combined hash code of it's elements:
nativeID Definition at line 200 of file MonitorDevice.java.
| final boolean com.jogamp.newt.MonitorDevice.isClone | ( | ) |
true if this device represents a clone, otherwise return false. Definition at line 214 of file MonitorDevice.java.
| final boolean com.jogamp.newt.MonitorDevice.isModeChangedByUs | ( | ) |
Returns true</true> if the MonitorMode has been changed programmatic via this API only, otherwise false.
Note: We cannot guarantee that we won't interfere w/ another running application's screen mode change or vice versa.
Definition at line 391 of file MonitorDevice.java.
| final boolean com.jogamp.newt.MonitorDevice.isOriginalMode | ( | ) |
| final boolean com.jogamp.newt.MonitorDevice.isPrimary | ( | ) |
Returns true if this device represents the primary device, otherwise return false.
Definition at line 220 of file MonitorDevice.java.
|
static |
Converts [1/mm] to [1/inch] in place.
| ppmm | float[2] [1/mm] value |
Definition at line 267 of file MonitorDevice.java.
|
abstract |
Returns the current MonitorMode resulting from a native query.
The returned MonitorMode is element of the lists getSupportedModes() and Screen#getMonitorModes().
| IllegalStateException | if the associated screen is not valid natively. |
|
abstract |
Set the current com.jogamp.newt.MonitorMode.
This method is lifecycle heavy.
| mode | to be made current, must be element of the list getSupportedModes() and Screen#getMonitorModes(). |
| IllegalStateException | if the associated screen is not valid natively. |
| String com.jogamp.newt.MonitorDevice.toString | ( | ) |
Definition at line 426 of file MonitorDevice.java.
|
static |
Calculates the union of the given monitor's viewport in pixel- and window units.
| viewport | storage for result in pixel units, maybe null |
| viewportInWindowUnits | storage for result in window units, maybe null |
| monitors | given list of monitors |
Definition at line 350 of file MonitorDevice.java.
|
protected |
Definition at line 74 of file MonitorDevice.java.
|
protected |
Definition at line 72 of file MonitorDevice.java.
|
protected |
Definition at line 73 of file MonitorDevice.java.
|
protected |
Definition at line 75 of file MonitorDevice.java.
|
protected |
Definition at line 65 of file MonitorDevice.java.
|
protected |
Definition at line 63 of file MonitorDevice.java.
|
protected |
Definition at line 64 of file MonitorDevice.java.
|
protected |
Definition at line 67 of file MonitorDevice.java.
|
protected |
Definition at line 69 of file MonitorDevice.java.
|
protected |
Definition at line 62 of file MonitorDevice.java.
|
protected |
Definition at line 66 of file MonitorDevice.java.
|
protected |
Definition at line 68 of file MonitorDevice.java.
|
protected |
Definition at line 70 of file MonitorDevice.java.
|
protected |
Definition at line 71 of file MonitorDevice.java.