X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fibex%2Fgraphics%2FSurface.java;h=165207f0b73a461f81435f0153f9a6fbca5a71bc;hb=026feed5d3ffb670533197a4ec733d1d03578c63;hp=ebf4670fd656024da0e7d13514f865955e01ffaf;hpb=05d23fde131a7d19b378c632c6cc6b7924d8ab4d;p=org.ibex.core.git diff --git a/src/org/ibex/graphics/Surface.java b/src/org/ibex/graphics/Surface.java index ebf4670..165207f 100644 --- a/src/org/ibex/graphics/Surface.java +++ b/src/org/ibex/graphics/Surface.java @@ -179,8 +179,9 @@ public abstract class Surface implements Callable { // FEATURE: can we avoid creating objects here? protected final void PosChange(final int x, final int y) { Platform.Scheduler.add(new Callable() { public Object run(Object o) throws JSExn { - root.x = x; - root.y = y; + // FIXME + //root.x = x; + //root.y = y; root.putAndTriggerTrapsAndCatchExceptions(JSU.S("PosChange"), T); return null; }}); @@ -258,7 +259,6 @@ public abstract class Surface implements Callable { // make sure the root is properly sized do { abort = false; - root.pack(); if (syncRootBoxToSurface) { root.setWidth(root.minwidth, pendingWidth); root.setHeight(root.minheight, pendingHeight); @@ -280,6 +280,7 @@ public abstract class Surface implements Callable { } while(abort); int[][] dirt = dirtyRegions.flush(); + for(int i = 0; dirt != null && i < dirt.length; i++) { if (dirt[i] == null) continue; int x = dirt[i][0], y = dirt[i][1], w = dirt[i][2], h = dirt[i][3]; @@ -289,7 +290,7 @@ public abstract class Surface implements Callable { if (y+h > root.height) h = root.height - y; if (w <= 0 || h <= 0) continue; - root.render(0, 0, x, y, x + w, y + h, this.getPixelBuffer(), identity); + root.render(x, y, x + w, y + h, this.getPixelBuffer(), identity); getPixelBuffer().drawPicture(scarImage, 0, root.height - scarImage.height, x, y, x+w, y+h); if (abort) {