Tabnine Logo
Scale.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
playn.core.gl.Scale
constructor

Best Java code snippets using playn.core.gl.Scale.<init> (Showing top 8 results out of 315)

origin: threerings/playn

/**
 * Configures the default scale to use for assets. This allows one to specify an intermediate
 * graphics scale (like 1.5) and scale the 2x imagery down to 1.5x instead of scaling the 1.5x
 * imagery up (or displaying nothing at all).
 */
public void setAssetScale(float scaleFactor) {
 this.assetScale = new Scale(scaleFactor);
}
origin: threerings/playn

/**
 * Configures the default scale to use for assets. This allows one to specify an intermediate
 * graphics scale (like 1.5) and scale the 2x imagery down to 1.5x instead of scaling the 1.5x
 * imagery up (or displaying nothing at all).
 */
public void setAssetScale(float scaleFactor) {
 this.assetScale = new Scale(scaleFactor);
}
origin: com.googlecode.playn/playn-android

/**
 * Configures the default scale to use for assets. This allows one to use higher resolution
 * imagery than the device might normally. For example, one can supply scale 2 here, and
 * configure the graphics scale to 1.25 in order to use iOS Retina graphics (640x960) on a WXGA
 * (480x800) device.
 */
public void setAssetScale(float scaleFactor) {
 this.assetScale = new Scale(scaleFactor);
}
origin: threerings/playn

/**
 * Configures the default scale to use for assets. This allows one to use higher resolution
 * imagery than the device might normally. For example, one can supply scale 2 here, and
 * configure the graphics scale to 1.25 in order to use iOS Retina graphics (640x960) on a WXGA
 * (480x800) device.
 */
public void setAssetScale(float scaleFactor) {
 this.assetScale = new Scale(scaleFactor);
}
origin: com.googlecode.playn/playn-java

/**
 * Configures the default scale to use for assets. This allows one to specify an intermediate
 * graphics scale (like 1.5) and scale the 2x imagery down to 1.5x instead of scaling the 1.5x
 * imagery up (or displaying nothing at all).
 */
public void setAssetScale(float scaleFactor) {
 this.assetScale = new Scale(scaleFactor);
}
origin: threerings/playn

protected GLContext(AbstractPlatform platform, float scaleFactor) {
 this.scale = new Scale(scaleFactor);
 this.platform = platform;
}
origin: threerings/playn

/**
 * Returns an ordered series of scaled resources to try when loading an asset. The highest
 * resolution will be tried first, then half that resolution and so forth down to a normal
 * resolution image. In general this is simply {@code 2, 1}, but on a Retina iPad, it could be
 * {@code 4, 2, 1}.
 */
public List<ScaledResource> getScaledResources(String path) {
 List<ScaledResource> rsrcs = new ArrayList<ScaledResource>();
 rsrcs.add(new ScaledResource(this, computePath(path, factor)));
 for (float rscale = MathUtil.ifloor(factor); rscale > 1; rscale -= 1) {
  if (rscale != factor) rsrcs.add(
   new ScaledResource(new Scale(rscale), computePath(path, rscale)));
 }
 rsrcs.add(new ScaledResource(ONE, path));
 return rsrcs;
}
origin: threerings/playn

public HtmlGraphicsCanvas(HtmlPlatform.Config config) {
 super(config);
 scale = new Scale(config.scaleFactor);
 rootLayer = new GroupLayerCanvas(createXform());
playn.core.glScale<init>

Popular methods of Scale

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

Popular in Java

  • Reading from database using SQL prepared statement
  • putExtra (Intent)
  • getResourceAsStream (ClassLoader)
  • startActivity (Activity)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • JCheckBox (javax.swing)
  • Top Vim 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