congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
MonitorDevice.getSizeMM
Code IndexAdd Tabnine to your IDE (free)

How to use
getSizeMM
method
in
com.jogamp.newt.MonitorDevice

Best Java code snippets using com.jogamp.newt.MonitorDevice.getSizeMM (Showing top 6 results out of 315)

origin: ch.unibas.cs.gravis/scalismo-native-stub

/**
 * Returns the <i>pixels per millimeter</i> value according to the given {@link MonitorMode mode}'s
 * {@link SurfaceSize#getResolution() surface resolution}.
 * <p>
 * To convert the result to <i>dpi</i>, i.e. dots-per-inch, multiply both components with <code>25.4f</code>.
 * </p>
 * @param mode
 * @param ppmmStore float[2] storage for the ppmm result
 * @return the passed storage containing the ppmm for chaining
 */
public final float[] getPixelsPerMM(final MonitorMode mode, final float[] ppmmStore) {
  final DimensionImmutable sdim = getSizeMM();
  final DimensionImmutable spix = mode.getSurfaceSize().getResolution();
  ppmmStore[0] = (float)spix.getWidth() / (float)sdim.getWidth();
  ppmmStore[1] = (float)spix.getHeight() / (float)sdim.getHeight();
  return ppmmStore;
}
origin: org.jogamp.jogl/jogl-all-noawt

/**
 * Returns the <i>pixels per millimeter</i> value according to the given {@link MonitorMode mode}'s
 * {@link SurfaceSize#getResolution() surface resolution}.
 * <p>
 * To convert the result to <i>dpi</i>, i.e. dots-per-inch, multiply both components with <code>25.4f</code>.
 * </p>
 * @param mode
 * @param ppmmStore float[2] storage for the ppmm result
 * @return the passed storage containing the ppmm for chaining
 */
public final float[] getPixelsPerMM(final MonitorMode mode, final float[] ppmmStore) {
  final DimensionImmutable sdim = getSizeMM();
  final DimensionImmutable spix = mode.getSurfaceSize().getResolution();
  ppmmStore[0] = (float)spix.getWidth() / (float)sdim.getWidth();
  ppmmStore[1] = (float)spix.getHeight() / (float)sdim.getHeight();
  return ppmmStore;
}
origin: ch.unibas.cs.gravis/scalismo-native-stub

data[idx++] = data.length;
data[idx++] = monitorDevice.getId();
data[idx++] = monitorDevice.getSizeMM().getWidth();
data[idx++] = monitorDevice.getSizeMM().getHeight();
data[idx++] = monitorDevice.getViewport().getX();
data[idx++] = monitorDevice.getViewport().getY();
origin: org.jogamp.jogl/jogl-all-noawt

data[idx++] = monitorDevice.isClone() ? 1 : 0;
data[idx++] = monitorDevice.isPrimary() ? 1 : 0;
data[idx++] = monitorDevice.getSizeMM().getWidth();
data[idx++] = monitorDevice.getSizeMM().getHeight();
data[idx++] = monitorDevice.getViewport().getX();
data[idx++] = monitorDevice.getViewport().getY();
origin: ch.unibas.cs.gravis/scalismo-native-stub

final MonitorDevice monitor = getMainMonitor();
if ( null != monitor ) {
  final DimensionImmutable mm = monitor.getSizeMM();
  final float pixWPerMM = (float)monitor.getCurrentMode().getRotatedWidth() / (float)mm.getWidth();
  final float pixHPerMM = (float)monitor.getCurrentMode().getRotatedHeight() / (float)mm.getHeight();
origin: org.jogamp.jogl/jogl-all-noawt

final MonitorDevice monitor = getMainMonitor();
if ( null != monitor ) {
  final DimensionImmutable mm = monitor.getSizeMM();
  final float pixWPerMM = (float)monitor.getCurrentMode().getRotatedWidth() / (float)mm.getWidth();
  final float pixHPerMM = (float)monitor.getCurrentMode().getRotatedHeight() / (float)mm.getHeight();
com.jogamp.newtMonitorDevicegetSizeMM

Popular methods of MonitorDevice

  • getCurrentMode
    Returns the cached current MonitorMode w/o native query. The returned MonitorMode is element of the
  • getSupportedModes
    Returns a list of immutable MonitorModes supported by this monitor. The list is ordered in descendin
  • setCurrentMode
    Set the current com.jogamp.newt.MonitorMode.This method is lifecycle heavy [Window.html#lifecycleHea
  • getId
  • getOriginalMode
    Returns the immutable original com.jogamp.newt.MonitorMode, as used at NEWT initialization. The retu
  • getPixelsPerMM
    Returns the pixels per millimeter value according to the current MonitorMode's SurfaceSize#getResolu
  • getViewport
    Returns the RectangleImmutable portion of the rotated virtual Screen size in pixel units represented
  • getViewportInWindowUnits
    Returns the RectangleImmutable portion of the rotated virtual Screen size in window units represente
  • isModeChangedByUs
    Returns true if the MonitorModehas been changed programmatic via this API only, otherwise false. Not
  • isOriginalMode
  • toString
  • unionOfViewports
    Calculates the union of the given monitor's #getViewport() in pixel- and window units.
  • toString,
  • unionOfViewports,
  • getScreen,
  • isClone,
  • isPrimary,
  • queryCurrentMode

Popular in Java

  • Reactive rest calls using spring rest template
  • scheduleAtFixedRate (Timer)
  • getApplicationContext (Context)
  • putExtra (Intent)
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • 21 Best IntelliJ Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now