public void constrain(Box b, Affine a) {
contentwidth = 0;
contentheight = 0;
- transform.e = 0;
- transform.f = 0;
a = a.copy().premultiply(transform);
//boolean relevant = packed() || ((fillcolor&0xff000000)!=0x0) || path!=null;
for(Box child = getChild(0); child != null; child = child.nextSibling()) {
xmin = Integer.MAX_VALUE; ymin = Integer.MAX_VALUE;
xmax = Integer.MIN_VALUE; ymax = Integer.MIN_VALUE;
+ if (packed()) {
+ child.transform.e = 0;
+ child.transform.f = 0;
+ }
child.constrain(this, Affine.identity());
if (xmin==Integer.MAX_VALUE||xmax==Integer.MIN_VALUE||ymin==Integer.MAX_VALUE||ymax== Integer.MIN_VALUE) continue;
- child.transform.e = -1 * xmin;
- child.transform.f = -1 * ymin;
+ if (packed()) {
+ child.transform.e = -1 * xmin;
+ child.transform.f = -1 * ymin;
+ }
contentwidth += (xmax-xmin);
contentheight = max(ymax-ymin, contentheight);
}
dirty();
polygon = null;
}
+ case "x": transform.e = JSU.toInt(value);
+ case "y": transform.f = JSU.toInt(value);
case "transform": {
transform = Affine.parse(JSU.toString(value));
- transform.e = 0;
- transform.f = 0;
+ //transform.e = 0;
+ //transform.f = 0;
if (getSurface() != null) // FIXME
getSurface().dirty(0, 0, getSurface().root.contentwidth, getSurface().root.contentheight);
REPLACE();