+ // this doesn't work on Win32 because the JVM is broken
+ /*
+ static final ColorModel cmodel = new ColorModel(8) {
+ public int getRed(int p) { return 0; }
+ public int getGreen(int p) { return 0; }
+ public int getBlue(int p) { return 0; }
+ public int getAlpha(int p) { return p & 0xFF; }
+ };
+ */
+
+ public AWTGlyph(org.xwt.Font f, char c) { super(f, c); }
+ Image getImage() {
+ if (i == null && isLoaded) {
+
+ int[] data2 = new int[data.length];
+ for(int i=0; i<data2.length; i++) data2[i] = ((data[i]) & 0xff) << 24;
+
+ MemoryImageSource mis = new MemoryImageSource(width, height, cmodel, data2, 0, width);
+ mis.setAnimated(true);
+ i = Toolkit.getDefaultToolkit().createImage(mis);
+ MediaTracker mediatracker = new MediaTracker(new Canvas());
+ mediatracker.addImage(i, 1);
+ try { mediatracker.waitForAll(); } catch (InterruptedException e) { }
+ mediatracker.removeImage(i);
+ synchronized(AWTPixelBuffer.class) {
+ if (AWTPixelBuffer.component == null) {
+ AWTPixelBuffer.component = new Frame();
+ AWTPixelBuffer.component.setVisible(false);
+ AWTPixelBuffer.component.addNotify();
+ }
+ }
+ data = null;
+ }
+ return i;
+ }
+ }
+
+ protected static class AWTPicture extends Picture {