Codota Logo
MonitorDevice.getPixelsPerMM
Code IndexAdd Codota to your IDE (free)

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

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

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
BufferedReader b =
  • Codota IconInputStream in;new BufferedReader(new InputStreamReader(in))
  • Codota IconReader in;new BufferedReader(in)
  • Codota IconFile file;new BufferedReader(new FileReader(file))
  • Smart code suggestions by Codota
}
origin: ch.unibas.cs.gravis/scalismo-native-stub

/**
 * Returns the <i>pixels per millimeter</i> value according to the <i>current</i> {@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 ppmmStore float[2] storage for the ppmm result
 * @return the passed storage containing the ppmm for chaining
 */
public final float[] getPixelsPerMM(final float[] ppmmStore) {
  return getPixelsPerMM(getCurrentMode(), ppmmStore);
}
origin: ch.unibas.cs.gravis/scalismo-native-stub

@Override
public final float[] getPixelsPerMM(final float[] ppmmStore) {
  getMainMonitor().getPixelsPerMM(ppmmStore);
  ppmmStore[0] *= (float)hasPixelScale[0] / (float)nativePixelScale[0];
  ppmmStore[1] *= (float)hasPixelScale[1] / (float)nativePixelScale[1];
  return ppmmStore;
}
origin: org.jogamp.jogl/jogl-all-noawt

/**
 * Returns the <i>pixels per millimeter</i> value according to the <i>current</i> {@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 ppmmStore float[2] storage for the ppmm result
 * @return the passed storage containing the ppmm for chaining
 */
public final float[] getPixelsPerMM(final float[] ppmmStore) {
  return getPixelsPerMM(getCurrentMode(), ppmmStore);
}
origin: org.jogamp.jogl/jogl-all-noawt

@Override
public final float[] getPixelsPerMM(final float[] ppmmStore) {
  getMainMonitor().getPixelsPerMM(ppmmStore);
  ppmmStore[0] *= hasPixelScale[0] / maxPixelScale[0];
  ppmmStore[1] *= hasPixelScale[1] / maxPixelScale[1];
  return ppmmStore;
}
origin: org.jogamp.jogl/jogl-all-noawt

@Override
public void init(final GLAutoDrawable drawable) {
  final MonitorDevice monitor = glWindow.getMainMonitor();
  System.err.println("Main Monitor: "+monitor);
  final float[] pixelPerMM = monitor.getPixelsPerMM(new float[2]);
  System.err.println("    pixel/mm ["+pixelPerMM[0]+", "+pixelPerMM[1]+"]");
  System.err.println("    pixel/in ["+pixelPerMM[0]*25.4f+", "+pixelPerMM[1]*25.4f+"]");
  final GL gl = drawable.getGL();
  System.err.println(JoglVersion.getGLInfo(gl, null));
  System.err.println("Requested: "+drawable.getNativeSurface().getGraphicsConfiguration().getRequestedCapabilities());
  System.err.println("Chosen   : "+drawable.getChosenGLCapabilities());
  System.err.println("GL impl. class "+gl.getClass().getName());
  if( gl.isGL4ES3() ) {
    final GL4ES3 _gl = gl.getGL4ES3();
    System.err.println("GL4ES3 retrieved, impl. class "+_gl.getClass().getName());
  }
  if( gl.isGL3() ) {
    final GL3 _gl = gl.getGL3();
    System.err.println("GL3 retrieved, impl. class "+_gl.getClass().getName());
  }
  if( gl.isGLES3() ) {
    final GLES3 _gl = gl.getGLES3();
    System.err.println("GLES3 retrieved, impl. class "+_gl.getClass().getName());
  }
  if( gl.isGLES2() ) {
    final GLES2 _gl = gl.getGLES2();
    System.err.println("GLES2 retrieved, impl. class "+_gl.getClass().getName());
  }
}
com.jogamp.newtMonitorDevicegetPixelsPerMM

Javadoc

Returns the pixels per millimeter value according to the given MonitorMode's SurfaceSize#getResolution().

To convert the result to dpi, i.e. dots-per-inch, multiply both components with 25.4f.

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
  • getSizeMM
  • 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

  • Start an intent from android
  • scheduleAtFixedRate (Timer)
  • getApplicationContext (Context)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • MalformedURLException (java.net)
    Thrown to indicate that a malformed URL has occurred. Either no legal protocol could be found in a s
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now