2003/10/16 05:39:20
[org.ibex.core.git] / src / org / xwt / translators / Freetype.java
index ccb3004..1608a75 100644 (file)
@@ -51,19 +51,21 @@ public class Freetype {
                 
                 int width = vm.getUserInfo(6);
                 int height = vm.getUserInfo(7);
-                int[] data = new int[width * height];
+                byte[] data = new byte[width * height];
                 int addr = vm.getUserInfo(5);
 
-                for(int i=0; i<width * height; i += 4) {
+                vm.copyin(addr,data,width*height);
+                
+                /*for(int i=0; i<width * height; i += 4) {
                     int val = vm.memRead(addr + i);
                     for (int k = 3; k >= 0; k--) {
                         if (i + k < width * height)
                             data[i + k] = (val & 0xff) << 24;
                         val >>>= 8;
                     }
-                }
+                }*/
                 
-                glyph.p = Platform.createPicture(data, width, height);
+                glyph.p = Platform.createAlphaOnlyPicture(data, width, height);
                 glyphCache.put(res, new Integer((g << 16) | pointsize), glyph);
             }
         } catch (Exception e) {