public void paint(Graphics g) { Polygon pt = at.transform(p); g.translate(xtranslate, ytranslate); g.drawPolygon(pt); for (int i = 0; i < pt.npoints; i++) g.drawString("p" + i, pt.xpoints[i], pt.ypoints[i]); Rectangle r = pt.getBounds(); g.drawString("h=" + r.height + " w=" + r.width, r.height / 2, r.width / 2); }
public Polygon getPolygon() { return at.transform(p); }
public void apply() { p = at.transform(p); xf.xform(at); }