congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
Scale.invScaledFloor
Code IndexAdd Tabnine to your IDE (free)

How to use
invScaledFloor
method
in
playn.core.gl.Scale

Best Java code snippets using playn.core.gl.Scale.invScaledFloor (Showing top 9 results out of 315)

origin: threerings/playn

@Override
public int height() {
 return scale.invScaledFloor(rootHeight);
}
origin: threerings/playn

@Override
public int width() {
 return scale.invScaledFloor(rootWidth);
}
origin: threerings/playn

/**
 * Sets the frame buffer to the specified width and height (in pixels). The view will potentially
 * be smaller than this size if a HiDPI scale factor is in effect.
 */
public final void setSize(int pixelWidth, int pixelHeight) {
 viewWidth = scale.invScaledFloor(pixelWidth);
 viewHeight = scale.invScaledFloor(pixelHeight);
 curFbufWidth = defaultFbufWidth = pixelWidth;
 curFbufHeight = defaultFbufHeight = pixelHeight;
 viewConfigChanged();
}
origin: com.googlecode.playn/playn-java

@Override
public int screenWidth() {
 return ctx.scale.invScaledFloor(Display.getDesktopDisplayMode().getWidth());
}
origin: threerings/playn

@Override
public int screenWidth() {
 return ctx.scale.invScaledFloor(Display.getDesktopDisplayMode().getWidth());
}
origin: threerings/playn

@Override
public int screenHeight() {
 return ctx.scale.invScaledFloor(Display.getDesktopDisplayMode().getHeight());
}
origin: com.googlecode.playn/playn-java

@Override
public int screenHeight() {
 return ctx.scale.invScaledFloor(Display.getDesktopDisplayMode().getHeight());
}
origin: com.googlecode.playn/playn-swt-java

 public void handleEvent(Event event) {
  // resize our GLCanvas to fill the window; we do manual layout so that other SWT widgets
  // can be overlaid on top of our GLCanvas
  Rectangle bounds = comp.getBounds();
  comp.setBounds(bounds);
  canvas.setBounds(bounds);
  makeCurrent();
  // SWTGraphics.this.platform.log().info("Resized " + bounds.width + "x" + bounds.height);
  ctx.setSize(ctx.scale.invScaledFloor(bounds.width), ctx.scale.invScaledFloor(bounds.height));
 }
});
origin: threerings/playn

 public void handleEvent(Event event) {
  // resize our GLCanvas to fill the window; we do manual layout so that other SWT widgets
  // can be overlaid on top of our GLCanvas
  Rectangle bounds = comp.getBounds();
  comp.setBounds(bounds);
  canvas.setBounds(bounds);
  makeCurrent();
  // SWTGraphics.this.platform.log().info("Resized " + bounds.width + "x" + bounds.height);
  ctx.setSize(ctx.scale.invScaledFloor(bounds.width), ctx.scale.invScaledFloor(bounds.height));
 }
});
playn.core.glScaleinvScaledFloor

Javadoc

Returns the supplied length inverse scaled by our scale factor and rounded down.

Popular methods of Scale

  • scaledCeil
  • invScaled
  • <init>
  • getScaledResources
  • scaled
    Returns the supplied length scaled by our scale factor.
  • computePath
  • scaledFloor

Popular in Java

  • Finding current android device location
  • setRequestProperty (URLConnection)
  • onRequestPermissionsResult (Fragment)
  • addToBackStack (FragmentTransaction)
  • Kernel (java.awt.image)
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • Top plugins for WebStorm
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