added calls from Box to Mesh
authoradam <adam@megacz.com>
Mon, 14 Feb 2005 04:30:00 +0000 (04:30 +0000)
committeradam <adam@megacz.com>
Mon, 14 Feb 2005 04:30:00 +0000 (04:30 +0000)
darcs-hash:20050214043000-5007d-437ab518bf33a66c9a3b801ff0a746bc28b61f36.gz

src/org/ibex/core/Box.java

index 9f5aac7..b68480f 100644 (file)
@@ -69,6 +69,7 @@ public final class Box extends JS.Obj implements Callable {
 
     // FEATURE: polygon caching
     private Polygon      polygon      = null;
 
     // FEATURE: polygon caching
     private Polygon      polygon      = null;
+    private Mesh         mesh         = null;
 
     // specified directly by user
     public int minwidth = 0;
 
     // specified directly by user
     public int minwidth = 0;
@@ -243,9 +244,10 @@ public final class Box extends JS.Obj implements Callable {
             } 
             // FIXME: texture
         } else {
             } 
             // FIXME: texture
         } else {
-            Polygon p = new Polygon(path, a);
-            p.fill(buf, new Paint.SingleColorPaint(fillcolor));
-            p.stroke(buf, strokecolor);
+            if (mesh == null) mesh = new Mesh(new Polygon(path, Affine.identity()));
+            mesh.fill(buf, a, fillcolor, true, false);
+            mesh.stroke(buf, a, strokecolor);
+            //mesh.fill(buf, a, fillcolor, true, true);
         }
 
         for(Box b = getChild(0); b != null; b = b.nextSibling()) b.render(buf, a);
         }
 
         for(Box b = getChild(0); b != null; b = b.nextSibling()) b.render(buf, a);