if (matted || !isLineClear || !edgeMatchesFill) {
if (matted) {
if (g instanceof Graphics2D
&& stroke instanceof BasicStroke) {
((Graphics2D) g).setStroke(new BasicStroke(((BasicStroke) stroke).getLineWidth() + 2f));
setGraphicsColor(g, mattingPaint);
g.drawPolyline(_x, _y, _x.length);
}
}
setGraphicsForEdge(g);
// for some reason, this used to be
// drawPolygon
g.drawPolygon(_x, _y, _x.length);
}
}
// render polyline
else {
if (matted) {
if (g instanceof Graphics2D
&& stroke instanceof BasicStroke) {
((Graphics2D) g).setStroke(new BasicStroke(((BasicStroke) stroke).getLineWidth() + 2f));
// Just to draw the matting for the
// arrowhead.
if (arrowhead != null) {
setGraphicsColor(g, mattingPaint);
arrowhead.render(g);