Batik and markers

Posted by Jeroen Reijn on October 24, 2006 - 1 min. read

Yesterday I stumbled upon another hidden feature of Batik, when I noticed that the Visio diagrams didn’t show their arrowheads in the generated jpeg. It seems this is caused by an inappropriate markerWidth/Height and viewbox. According to the SVG specification you need to make sure the marker does not overflow it’s viewport.

A quick fix for this problem setting the overflow to visible on the marker.

<marker id="mrkr1-7" class="st2"
        v:arrowType="1" v:arrowSize="2"
        orient="auto" overflow="visible"
        markerUnits="strokeWidth" />

Thanks to Google and Thomas DeWeese!