final double posY = shape.getPosition().getY();
final IArrow arr0 = shape.getArrowAt(1);
final IArrow arr1 = shape.getArrowAt(3);
final double arr0Reduction = arr0.getArrowStyle().needsLineReduction() ? arr0.getArrowShapedWidth() : 0.;
final double arr1Reduction = arr1.getArrowStyle().needsLineReduction() ? arr1.getArrowShapedWidth() : 0.;
final IPolyline xLine = ShapeFactory.createPolyline();
final IPolyline yLine = ShapeFactory.createPolyline();
xLine.addPoint(ShapeFactory.createPoint(posX+shape.getGridStartX()*IShape.PPC + arr0Reduction, posY));
xLine.addPoint(ShapeFactory.createPoint(posX+shape.getGridEndX()*IShape.PPC - arr1Reduction, posY));
yLine.addPoint(ShapeFactory.createPoint(posX, posY-shape.getGridStartY()*IShape.PPC - arr0Reduction));
yLine.addPoint(ShapeFactory.createPoint(posX, posY-shape.getGridEndY()*IShape.PPC + arr1Reduction));
xLine.getArrowAt(0).copy(arr0);
xLine.getArrowAt(1).copy(arr1);
yLine.getArrowAt(0).copy(shape.getArrowAt(0));
yLine.getArrowAt(1).copy(shape.getArrowAt(2));
final SVGElement eltX = new LPolylinesSVGGenerator(xLine).toSVG(document);
final SVGElement eltY = new LPolylinesSVGGenerator(yLine).toSVG(document);
elt.appendChild(eltX);
elt.appendChild(eltY);