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.impl; //from w w w .jav a2 s.co m import android.graphics.Bitmap; import com.badlogic.androidgames.framework.Graphics.PixmapFormat; import com.badlogic.androidgames.framework.Pixmap; public class AndroidPixmap implements Pixmap { Bitmap bitmap; PixmapFormat format; public AndroidPixmap(Bitmap bitmap, PixmapFormat format) { this.bitmap = bitmap; this.format = format; } @Override public int getWidth() { return bitmap.getWidth(); } @Override public int getHeight() { return bitmap.getHeight(); } @Override public PixmapFormat getFormat() { return format; } @Override public void dispose() { bitmap.recycle(); } }