public SVGElement toSVG(final SVGDocument doc, final boolean isShadow) {
if(doc==null || !arrow.hasStyle())
return null;
final ArrowStyle arrowStyle = arrow.getArrowStyle();
final SVGElement marker = new SVGMarkerElement(doc);
final double lineWidth = arrow.getShape().getFullThickness();
double gapPostion = 0.;
if(arrowStyle==ArrowStyle.CIRCLE_END || arrowStyle==ArrowStyle.CIRCLE_IN)
gapPostion = toSVGCircle(doc, lineWidth, isShadow, marker);
else
if(arrowStyle==ArrowStyle.DISK_END || arrowStyle==ArrowStyle.DISK_IN)
gapPostion = toSVGDisk(doc, lineWidth, isShadow, marker);
else
if(arrowStyle.isBar())
toSVGBar(doc, lineWidth, isShadow, marker);
else if(arrowStyle.isSquareBracket())
toSVGSquareBracket(doc, lineWidth, isShadow, marker);
else
if(arrowStyle==ArrowStyle.RIGHT_ARROW || arrowStyle==ArrowStyle.LEFT_ARROW)
toSVGArrow(doc, lineWidth, isShadow, marker);
else
if(arrowStyle.isRoundBracket())
toSVGRoundBracket(doc, lineWidth, isShadow, marker);
else
if(arrowStyle==ArrowStyle.LEFT_DBLE_ARROW || arrowStyle==ArrowStyle.RIGHT_DBLE_ARROW)
toSVGDoubleArrow(doc, lineWidth, isShadow, marker);
else
if(arrowStyle==ArrowStyle.ROUND_IN)
toSVGRoundIn(doc, isShadow, marker);
if(!LNumber.equalsDouble(gapPostion,0.))
marker.setAttribute(SVGAttributes.SVG_REF_X, String.valueOf(gapPostion/lineWidth));
marker.setAttribute(SVGAttributes.SVG_OVERFLOW, SVGAttributes.SVG_VALUE_VISIBLE);
marker.setAttribute(SVGAttributes.SVG_ORIENT, SVGAttributes.SVG_VALUE_AUTO);
return marker;
}