private int contentwidth = 0; // == max(minwidth, textwidth, sum(child.contentwidth))
private int contentheight = 0;
+ private Path path = null;
/*
- private VectorGraphics.VectorPath path = null;
private Affine transform = null;
private VectorGraphics.RasterPath rpath = null;
private Affine rtransform = null;
public void perform() throws JSExn {
if (texture == null) { Log.warn(Box.class, "perform() called with null texture"); return; }
if (texture.isLoaded) {
- setWidth(max(texture.width, maxwidth), maxwidth);
- setHeight(max(texture.height, maxheight), maxheight);
+ setWidth(max(texture.width, minwidth), maxwidth);
+ setHeight(max(texture.height, minheight), maxheight);
DIRTY; }
else { JS res = texture.stream; texture = null; throw new JSExn("image not found: "+res.unclone()); }
}
font.rasterizeGlyphs(text, buf, strokecolor, text_x, text_y, cx1, cy1, cx2, cy2);
}
+ if (path != null) path.realize(Affine.translate(globalx, globaly)).stroke(buf, 1, strokecolor);
+
for(Box b = getChild(0); b != null; b = b.nextSibling())
b.render(globalx, globaly, cx1, cy1, cx2, cy2, buf, null);
}
case "shrink": CHECKSET_FLAG(HSHRINK | VSHRINK); RECONSTRAIN();
case "hshrink": CHECKSET_FLAG(HSHRINK); RECONSTRAIN();
case "vshrink": CHECKSET_FLAG(VSHRINK); RECONSTRAIN();
+ case "path": path = Path.parse(toString(value)); DIRTY;
case "width": setWidth(toInt(value), toInt(value));
case "height": setHeight(toInt(value), toInt(value));
case "maxwidth": setWidth(minwidth, toInt(value));
b.clear(MOUSEINSIDE);
deleteNode(i);
b.parent = null;
- RECONSTRAIN();
+ REPACK();
putAndTriggerTrapsAndCatchExceptions("ChildChange", b);
}
b.parent = this;
// need both of these in case child was already uncalc'ed
- b.RECONSTRAIN();
- RECONSTRAIN();
+ b.REPACK();
+ REPACK();
b.DIRTY;
putAndTriggerTrapsAndCatchExceptions("ChildChange", b);