X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fxwt%2Fplat%2FAWT.java;h=1138f26ec1f7237f84466f8e0126c2e589d19645;hb=91fa07eeabb1c256410385947e6a76f1e45c8b48;hp=b03c65f0a595dc8c184294e49cfad1ba4b2d8197;hpb=772b947b9b23de711953d0a1e33cef5f356c442a;p=org.ibex.core.git diff --git a/src/org/xwt/plat/AWT.java b/src/org/xwt/plat/AWT.java index b03c65f..1138f26 100644 --- a/src/org/xwt/plat/AWT.java +++ b/src/org/xwt/plat/AWT.java @@ -117,17 +117,28 @@ public class AWT extends JVM { protected org.xwt.Font.Glyph _createGlyph(org.xwt.Font f, char c) { return new AWTGlyph(f, c); } protected static class AWTGlyph extends org.xwt.Font.Glyph { private Image i = null; + private static ColorModel cmodel = new DirectColorModel(32, 0x00FF0000, 0x0000FF00, 0x000000FF, 0xFF000000); + + // 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) { - i = Toolkit.getDefaultToolkit().createImage(new MemoryImageSource(width, height, cmodel, data, 0, width)); + + int[] data2 = new int[data.length]; + for(int i=0; i