public class JSImage extends BufferedImage {
// a BufferedImage in name only, actually;
int typeRequested;
- int[] pix; // not used in Java, but may be used in JavaScript
+ int[] pix;
public DOMNode _imgNode; // used by JSGraphics2D directly
private int width, height;
- public JSImage() {
- super(1,1, TYPE_INT_ARGB);
-
- }
-
- public JSImage setData(int width, int height, int[] argb) {
- pix = argb;
+ public JSImage(int[] argb, int width, int height) {
+ super(width, height, TYPE_INT_ARGB);
this.width = width;
this.height = height;
- getColorModel().createCompatibleWritableRaster(width, height);
- return this;
+ pix = argb;
}
/**