Add wrapped AWT for headless platform
This commit is contained in:
1 parent
05a09dd437
commit
d038e80c04
21 files changed
+264
No files matched your search
@@ -0,0 +1,13 @@
|
||||
package jdpi.awt.image;
|
||||
|
||||
public class WritableRaster {
|
||||
private BufferedImage image;
|
||||
public WritableRaster(BufferedImage image) {
|
||||
this.image = image;
|
||||
}
|
||||
public DataBuffer getDataBuffer() {
|
||||
int[] theBuf = new int[image.getWidth() * image.getHeight()];
|
||||
image.getRGB(0, 0, image.getWidth(), image.getHeight(), theBuf, 0, image.getWidth());
|
||||
return new DataBufferInt(theBuf, theBuf.length);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user