X-Git-Url: http://source.jalview.org/gitweb/?p=jalviewjs.git;a=blobdiff_plain;f=src%2Fswingjs%2FJSImage.java;fp=src%2Fswingjs%2FJSImage.java;h=0de3895032d9d3e91c38b9d291c0ae868d781b6f;hp=15016880049feb4dce88a8c02e00564bf3333d6b;hb=36d803e4a1f98728e91e80de5fa0b95e0cadb0d4;hpb=5b669b6c1a4f1f29b178283a46bc22fcd66aabad diff --git a/src/swingjs/JSImage.java b/src/swingjs/JSImage.java index 1501688..0de3895 100644 --- a/src/swingjs/JSImage.java +++ b/src/swingjs/JSImage.java @@ -8,21 +8,15 @@ import java.awt.image.ImageObserver; 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; } /**