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;
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));
static final byte TYPE_CUBIC = 3;
static final byte TYPE_QUADRADIC = 4;
+ public static Path parse(String s) { return Tokenizer.parse(s); }
public static class Tokenizer {
// FIXME: check array bounds exception for improperly terminated string
String s;
return ret;
}
}
-
-
}