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

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

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

origin: threerings/playn

/** Returns the supplied length scaled by our scale factor and rounded down. */
public int scaledFloor(float length) {
 return MathUtil.ifloor(scaled(length));
}
origin: threerings/playn

public RoboCanvas(RoboGLContext ctx, float width, float height, boolean interpolate) {
 super(width, height);
 // if our size is invalid, we'll fail below at CGBitmapContext, so fail here more usefully
 if (width <= 0 || height <= 0) throw new IllegalArgumentException(
  "Invalid size " + width + "x" + height);
 states.addFirst(new RoboCanvasState());
 this.ctx = ctx;
 // create our raw image data
 texWidth = ctx.scale.scaledCeil(width);
 texHeight = ctx.scale.scaledCeil(height);
 // create the bitmap context via which we'll render into it
 bctx = RoboGraphics.createCGBitmap(texWidth, texHeight);
 if (!interpolate) {
  bctx.setInterpolationQuality(CGInterpolationQuality.None);
 }
 // clear the canvas before we scale our bitmap context to avoid artifacts
 bctx.clearRect(new CGRect(0, 0, texWidth, texHeight));
 // CG coordinate system is OpenGL-style (0,0 in lower left); so we flip it
 bctx.translateCTM(0, ctx.scale.scaled(height));
 bctx.scaleCTM(ctx.scale.factor, -ctx.scale.factor);
}
origin: threerings/playn

/** Returns the supplied length scaled by our scale factor and rounded up. */
public int scaledCeil(float length) {
 return MathUtil.iceil(scaled(length));
}
playn.core.glScalescaled

Javadoc

Returns the supplied length scaled by our scale factor.

Popular methods of Scale

  • scaledCeil
  • invScaled
  • <init>
  • getScaledResources
  • invScaledFloor
  • computePath
  • scaledFloor

Popular in Java

  • Running tasks concurrently on multiple threads
  • setRequestProperty (URLConnection)
  • requestLocationUpdates (LocationManager)
  • setScale (BigDecimal)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • Notification (javax.management)
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Top plugins for WebStorm
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