JavaSurfacepublic final class JavaSurface extends AbstractSurface
Fields Summary |
---|
private int[] | dataInt | private short[] | dataShort | private byte[] | dataByte |
Constructors Summary |
---|
public JavaSurface(int[] data, int width, int height)
this(data, TYPE_INT_ARGB, width, height);
| public JavaSurface(int[] dataInt, int dataType, int width, int height)
this.dataInt = dataInt;
switch (dataType) {
case TYPE_INT_RGB:
case TYPE_INT_ARGB:
case TYPE_INT_ARGB_PRE:
break;
case TYPE_USHORT_565_RGB:
case TYPE_BYTE_GRAY:
throw new IllegalArgumentException("Use different constructor"
+ " for " + JavaSurface.class.getName() + " to use this"
+ " data type");
default:
throw new IllegalArgumentException("Data type not supported "
+ " for " + JavaSurface.class.getName());
}
initialize(dataType, width, height);
| public JavaSurface(short[] dataShort, int dataType, int width, int height)
this.dataShort = dataShort;
switch (dataType) {
case TYPE_USHORT_565_RGB:
break;
case TYPE_INT_RGB:
case TYPE_INT_ARGB:
case TYPE_INT_ARGB_PRE:
case TYPE_BYTE_GRAY:
throw new IllegalArgumentException("Use different constructor"
+ " for " + JavaSurface.class.getName() + " to use this"
+ " data type");
default:
throw new IllegalArgumentException("Data type not supported "
+ " for " + JavaSurface.class.getName());
}
initialize(dataType, width, height);
| public JavaSurface(byte[] dataByte, int dataType, int width, int height)
this.dataByte = dataByte;
switch (dataType) {
case TYPE_BYTE_GRAY:
break;
case TYPE_INT_RGB:
case TYPE_INT_ARGB:
case TYPE_INT_ARGB_PRE:
case TYPE_USHORT_565_RGB:
throw new IllegalArgumentException("Use different constructor"
+ " for " + JavaSurface.class.getName() + " to use this"
+ " data type");
default:
throw new IllegalArgumentException("Data type not supported "
+ " for " + JavaSurface.class.getName());
}
initialize(dataType, width, height);
|
Methods Summary |
---|
private native void | initialize(int dataType, int width, int height)
|
|