questionable patch: merge of a lot of stuff from the svg branch
[org.ibex.core.git] / src / org / ibex / graphics / Path.java
index 2b5be3c..7dce44b 100644 (file)
@@ -187,6 +187,13 @@ public class Path {
         }
     }
 
+    public long boundingBox(Affine a) {
+        long hb = horizontalBounds(a);
+        long vb = verticalBounds(a);
+        return Encode.twoFloatsToLong(Math.abs(Encode.longToFloat1(hb) - Encode.longToFloat2(hb)),
+                                      Math.abs(Encode.longToFloat1(vb) - Encode.longToFloat2(vb)));
+    }
+
     //#repeat width/height multiply_px/multiply_py horizontalBounds/verticalBounds
     public long horizontalBounds(Affine a) {
         // FIXME wrong