Back to project page tetris-android.
The source code is released under:
MIT License
If you think the Android project tetris-android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.badlogic.androidgames.framework.gl; /*from w w w. ja v a 2 s .co m*/ public class TextureRegion { public final float u1, v1; public final float u2, v2; public final float width,height; public final Texture texture; public TextureRegion(Texture texture, float x, float y, float width, float height) { this.u1 = x / texture.width; this.v1 = y / texture.height; this.u2 = this.u1 + width / texture.width; this.v2 = this.v1 + height / texture.height; this.width = width; this.height = height; this.texture = texture; } }