// Safety check.
if (points.length > 1) {
GeneralPath path = new GeneralPath(
renderer.getWindingRule());
path.moveTo((float)points[0].getX(), (float)points[0].getY());
for (int i = 1; i < points.length; i++) {
path.lineTo((float)points[i].getX(), (float)points[i].getY());
}
path.closePath();
renderer.fillAndDrawOrAppend(path);