git://source.jalview.org
/
jalviewjs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-1807 - Bob's last(?) before leaving Dundee -- adds fast file loading
[jalviewjs.git]
/
src
/
swingjs
/
JSImage.java
diff --git
a/src/swingjs/JSImage.java
b/src/swingjs/JSImage.java
index
1501688
..
0de3895
100644
(file)
--- 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;
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 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;
this.width = width;
this.height = height;
- getColorModel().createCompatibleWritableRaster(width, height);
- return this;
+ pix = argb;
}
/**
}
/**