Mesh replaces Polygon
[org.ibex.core.git] / src / org / ibex / plat / AWT.java
index 113ca78..e84f497 100644 (file)
@@ -247,8 +247,8 @@ public class AWT extends JVM {
             g.drawLine(x1, y1, x2, y2);
         }
 
-        public void stroke(org.ibex.graphics.Polygon p, int color) { p.stroke(this, color); }
-        public void fill(org.ibex.graphics.Polygon p, org.ibex.graphics.Paint paint) { p.fill(this, paint); }
+        public void stroke(org.ibex.graphics.Mesh p, int color) { /*p.stroke(this, color);*/ }
+        public void fill(org.ibex.graphics.Mesh p, org.ibex.graphics.Paint paint) { /*p.fill(this, paint);*/ }
 
         private static int[] xa = new int[4];
         private static int[] ya = new int[4];
@@ -293,7 +293,7 @@ public class AWT extends JVM {
     }
     
     
-    protected static class AWTSurface extends Surface.DoubleBufferedSurface
+    protected static class AWTSurface extends Surface
         implements MouseListener, MouseMotionListener, KeyListener, ComponentListener, WindowListener {
 
         protected AWTPixelBuffer pb = null;
@@ -301,6 +301,8 @@ public class AWT extends JVM {
         Frame frame = null;
         Window window = null;
 
+        public PixelBuffer getPixelBuffer() { return pb==null?(pb=new AWTPixelBuffer(this)):pb; }
+
         public void blit(PixelBuffer source, int sx, int sy, int dx, int dy, int dx2, int dy2) {
             getGraphics().drawImage(((AWTPixelBuffer)source).i, sx, sy, sx+(dx2-dx), sy+(dy2-dy), dx, dy, dx2, dy2, null);
         }
@@ -378,6 +380,7 @@ public class AWT extends JVM {
         private int oldfill = 0x0;
         public void render() {
             // useful optimizatin;
+            /*
             if (oldfill != root.fillcolor) {
                 oldfill = root.fillcolor;
                 window.setBackground((root.fillcolor & 0xFF000000) == 0 ?
@@ -386,6 +389,7 @@ public class AWT extends JVM {
                                                (root.fillcolor >> 8) & 0xff,
                                                (root.fillcolor) & 0xff));
             }
+            */
             super.render();
         }