Element e,
ShapeNode shapeNode) {
String s = e.getAttributeNS(null, SVG_POINTS_ATTRIBUTE);
if (s.length() != 0) {
AWTPolygonProducer app = new AWTPolygonProducer();
app.setWindingRule(CSSUtilities.convertFillRule(e));
try {
PointsParser pp = new PointsParser();
pp.setPointsHandler(app);
pp.parse(new StringReader(s));
} catch (ParseException ex) {
BridgeException bex
= new BridgeException(e, ERR_ATTRIBUTE_VALUE_MALFORMED,
new Object[] {SVG_POINTS_ATTRIBUTE});
bex.setGraphicsNode(shapeNode);
throw bex;
} finally {
shapeNode.setShape(app.getShape());
}
} else {
throw new BridgeException(e, ERR_ATTRIBUTE_MISSING,
new Object[] {SVG_POINTS_ATTRIBUTE});
}