* Make AndroidImageInfo extensible, add javadoc explanation

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9187 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
Sha..om 13 years ago
parent 06f5ad5bce
commit b12285b8a4
  1. 16
      engine/src/android/com/jme3/asset/AndroidImageInfo.java

@ -8,11 +8,19 @@ import com.jme3.texture.Image.Format;
import java.io.IOException;
import java.io.InputStream;
/**
* <code>AndroidImageInfo</code> is set in a jME3 image via the {@link Image#setEfficientData(java.lang.Object)}
* method to retrieve a {@link Bitmap} when it is needed by the renderer.
* User code may extend <code>AndroidImageInfo</code> and provide their own implementation of the
* {@link AndroidImageInfo#loadBitmap()} method to acquire a bitmap by their own means.
*
* @author Kirill Vainer
*/
public class AndroidImageInfo {
private AssetInfo assetInfo;
private Bitmap bitmap;
private Format format;
protected AssetInfo assetInfo;
protected Bitmap bitmap;
protected Format format;
public AndroidImageInfo(AssetInfo assetInfo) {
this.assetInfo = assetInfo;
@ -42,7 +50,7 @@ public class AndroidImageInfo {
* Loads the bitmap directly from the asset info, possibly updating
* or creating the image object.
*/
private void loadBitmap() throws IOException{
protected void loadBitmap() throws IOException{
InputStream in = null;
try {
in = assetInfo.openStream();

Loading…
Cancel
Save