Tabnine Logo
Scale.scaledFloor
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: threerings/playn

@Override
protected Pattern toSubPattern(AbstractImageGL<?> image, boolean repeatX, boolean repeatY,
                float x, float y, float width, float height) {
 assert isReady() : "Cannot generate a pattern from unready image.";
 // we have to account for the scale factor when extracting our subimage
 BufferedImage subImage = img.getSubimage(
  scale.scaledFloor(x), scale.scaledFloor(y),
  scale.scaledCeil(width), scale.scaledCeil(height));
 Rectangle2D rect = new Rectangle2D.Float(0, 0, width, height);
 return new JavaPattern(image, repeatX, repeatY, new TexturePaint(subImage, rect));
}
origin: com.googlecode.playn/playn-java

@Override
protected Pattern toSubPattern(AbstractImageGL<?> image, boolean repeatX, boolean repeatY,
                float x, float y, float width, float height) {
 assert isReady() : "Cannot generate a pattern from unready image.";
 // we have to account for the scale factor when extracting our subimage
 BufferedImage subImage = img.getSubimage(
  scale.scaledFloor(x), scale.scaledFloor(y),
  scale.scaledCeil(width), scale.scaledCeil(height));
 Rectangle2D rect = new Rectangle2D.Float(0, 0, width, height);
 return new JavaPattern(image, repeatX, repeatY, new TexturePaint(subImage, rect));
}
playn.core.glScalescaledFloor

Javadoc

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

Popular methods of Scale

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

Popular in Java

  • Reading from database using SQL prepared statement
  • addToBackStack (FragmentTransaction)
  • requestLocationUpdates (LocationManager)
  • startActivity (Activity)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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