/** * Informs the graphics system that the main framebuffer size has changed. The supplied size * should be in physical pixels. */ protected void viewportChanged (int pixelWidth, int pixelHeight) { viewPixelWidth = pixelWidth; viewPixelHeight = pixelHeight; viewSizeM.width = scale.invScaled(pixelWidth); viewSizeM.height = scale.invScaled(pixelHeight); plat.log().info("viewPortChanged " + pixelWidth + "x" + pixelHeight + " / " + scale.factor + " -> " + viewSize); }
/** Returns the supplied length inverse scaled by our scale factor and rounded up. */ public int invScaledCeil(float length) { return MathUtil.iceil(invScaled(length)); }
/** * Informs the graphics system that the main framebuffer size has changed. The supplied size * should be in physical pixels. */ protected void viewportChanged (int pixelWidth, int pixelHeight) { viewPixelWidth = pixelWidth; viewPixelHeight = pixelHeight; viewSizeM.width = scale.invScaled(pixelWidth); viewSizeM.height = scale.invScaled(pixelHeight); plat.log().info("viewPortChanged " + pixelWidth + "x" + pixelHeight + " / " + scale.factor + " -> " + viewSize); }
/** Returns the supplied length inverse scaled by our scale factor and rounded down. */ public int invScaledFloor(float length) { return MathUtil.ifloor(invScaled(length)); }
/** Returns the supplied length inverse scaled by our scale factor and rounded up. */ public int invScaledCeil(float length) { return MathUtil.iceil(invScaled(length)); }
/** Returns the supplied length inverse scaled by our scale factor and rounded down. */ public int invScaledFloor(float length) { return MathUtil.ifloor(invScaled(length)); }
/** * This image's height in display units. If this image is loaded asynchrously, this will return * 0 until loading is complete. See {@link #state}. */ public float height () { return scale().invScaled(pixelHeight()); }
/** * This image's height in display units. If this image is loaded asynchrously, this will return * 0 until loading is complete. See {@link #state}. */ public float height () { return scale().invScaled(pixelHeight()); }
/** * This image's width in display units. If this image is loaded asynchrously, this will return * 0 until loading is complete. See {@link #state}. */ public float width () { return scale().invScaled(pixelWidth()); }
/** * This image's width in display units. If this image is loaded asynchrously, this will return * 0 until loading is complete. See {@link #state}. */ public float width () { return scale().invScaled(pixelWidth()); }