X-Git-Url: http://git.megacz.com/?p=org.ibex.core.git;a=blobdiff_plain;f=src%2Forg%2Fibex%2Fplat%2FAWT.java;fp=src%2Forg%2Fibex%2Fplat%2FAWT.java;h=e84f497368c16e98095e273d5e9eb99ec6692d7f;hp=113ca789e27a6851101c0c40efe96131f4d2bb51;hb=531e31402f74fa636b2d9a2a367305bfd0777cdc;hpb=b0554ff79ee5f166eab7c660e5a872806df68271 diff --git a/src/org/ibex/plat/AWT.java b/src/org/ibex/plat/AWT.java index 113ca78..e84f497 100644 --- a/src/org/ibex/plat/AWT.java +++ b/src/org/ibex/plat/AWT.java @@ -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(); }