y1 = _getDouble(attributes, "y1", 0);
x2 = _getDouble(attributes, "x2", 0);
y2 = _getDouble(attributes, "y2", 0);
Line2D line = new Line2D.Double(x1, y1, x2, y2);
PaintedPath pp = new PaintedPath(line);
processPaintedPathAttributes(pp, attributes);
return pp;
} else if (type.equals("polyline")) {
double[] coords = parseCoordString((String) attributes
.get("points"));
Polyline2D poly = new Polyline2D.Double();
poly.moveTo(coords[0], coords[1]);
for (int i = 2; i < coords.length; i += 2) {
poly.lineTo(coords[i], coords[i + 1]);
}
PaintedPath pp = new PaintedPath(poly);
processPaintedPathAttributes(pp, attributes);
return pp;
} else if (type.equals("polygon")) {
double[] coords = parseCoordString((String) attributes
.get("points"));