172173174175176177178179180181182
.get("points")); Polygon2D poly = new Polygon2D.Double(); poly.moveTo(coords[0], coords[1]); for (int i = 2; i < coords.length; i += 2) { poly.lineTo(coords[i], coords[i + 1]); } poly.closePath(); PaintedShape ps = new PaintedShape(poly);