final double whiteDash = shape.getDashSepWhite();
final boolean hasDble = shape.hasDbleBord();
final Color col = shape.getLineColour();
final boolean isClosed = shape.isClosed();
final SVGGElement showPts = new SVGGElement(doc);
final IArrow arrow1 = shape.getArrowAt(0);
final IArrow arrow2 = shape.getArrowAt(-1);
final double doubleSep = shape.getDbleBordSep();
final double thick = (hasDble ? shape.getDbleBordSep()+shape.getThickness()*2. : shape.getThickness())/2.;
final double rad = (PSTricksConstants.DEFAULT_ARROW_DOTSIZE_DIM*IShape.PPC + PSTricksConstants.DEFAULT_ARROW_DOTSIZE_NUM*thick*2.)/2.;
int i;
final int size = shape.getNbPoints();
showPts.setAttribute(LNamespace.LATEXDRAW_NAMESPACE + ':' + LNamespace.XML_TYPE, LNamespace.XML_TYPE_SHOW_PTS);
/* Plotting the lines. */
for(i=3; i<size; i+=2) {
showPts.appendChild(getShowPointsLine(doc, thick, col, shape.getPtAt(i-1), shape.getSecondCtrlPtAt(i-1),
blackDash, whiteDash, hasDble, 1., doubleSep));
showPts.appendChild(getShowPointsLine(doc, thick, col, shape.getSecondCtrlPtAt(i-1), shape.getFirstCtrlPtAt(i),
blackDash, whiteDash, hasDble, 1., doubleSep));
showPts.appendChild(getShowPointsLine(doc, thick, col, shape.getFirstCtrlPtAt(i), shape.getPtAt(i),
blackDash, whiteDash, hasDble, 1., doubleSep));
}
for(i=2; i<size; i+=2) {
showPts.appendChild(getShowPointsLine(doc, thick, col, shape.getPtAt(i-1), shape.getSecondCtrlPtAt(i-1),
blackDash, whiteDash, hasDble, 1., doubleSep));
showPts.appendChild(getShowPointsLine(doc, thick, col, shape.getSecondCtrlPtAt(i-1), shape.getFirstCtrlPtAt(i),
blackDash, whiteDash, hasDble, 1., doubleSep));
showPts.appendChild(getShowPointsLine(doc, thick, col, shape.getFirstCtrlPtAt(i), shape.getPtAt(i),
blackDash, whiteDash, hasDble, 1., doubleSep));
}
if(isClosed) {
showPts.appendChild(getShowPointsLine(doc, thick, col, shape.getPtAt(-1), shape.getSecondCtrlPtAt(-1),
blackDash, whiteDash, hasDble, 1., doubleSep));
showPts.appendChild(getShowPointsLine(doc, thick, col, shape.getSecondCtrlPtAt(-1), shape.getSecondCtrlPtAt(0),
blackDash, whiteDash, hasDble, 1., doubleSep));
showPts.appendChild(getShowPointsLine(doc, thick, col, shape.getSecondCtrlPtAt(0), shape.getPtAt(0),
blackDash, whiteDash, hasDble, 1., doubleSep));
}
showPts.appendChild(getShowPointsLine(doc, thick, col, shape.getPtAt(0), shape.getFirstCtrlPtAt(0),
blackDash, whiteDash, hasDble, 1., doubleSep));
showPts.appendChild(getShowPointsLine(doc, thick, col, shape.getFirstCtrlPtAt(0), shape.getFirstCtrlPtAt(1),
blackDash, whiteDash, hasDble, 1., doubleSep));
showPts.appendChild(getShowPointsLine(doc, thick, col, shape.getFirstCtrlPtAt(1), shape.getPtAt(1),
blackDash, whiteDash, hasDble, 1., doubleSep));
// Plotting the dots.
if(!arrow1.hasStyle() || isClosed)
showPts.appendChild(LShapeSVGGenerator.getShowPointsDot(doc, rad, shape.getPtAt(0), col));
if(!arrow2.hasStyle() || isClosed)
showPts.appendChild(LShapeSVGGenerator.getShowPointsDot(doc, rad, shape.getPtAt(-1), col));
for(i=1; i<size-1; i++) {
showPts.appendChild(LShapeSVGGenerator.getShowPointsDot(doc, rad, shape.getPtAt(i), col));
showPts.appendChild(LShapeSVGGenerator.getShowPointsDot(doc, rad, shape.getSecondCtrlPtAt(i), col));