hardc0d3r wrote:
> sir, how do i do this in batik? how do i add the path do the marker element?

after loading the svg containing the marker e.g. into an SVGCanvas named
svgCanvas fetch the document:

org.w3c.dom.Document document = svgCanvas.getSVGDocument();

best do this in a listener callback as loading svg in batik is not
synchronous, like

treeRendererAdapter = new GVTTreeRendererAdapter() {
  public void gvtRenderingCompleted(GVTTreeRendererEvent e) {
    // initialise document root
    document = svgCanvas.getSVGDocument();
  }
};
svgCanvas.addGVTTreeRendererListener(treeRendererAdapter);

The rest can be done via the documents DOM interface:

find your marker element -lets name it markEl- by name, id or path
(svgCanvas.getElementById, svgCanvas.getElementsByName or using sth.
like javax.xml.xpath.XPath)

Then create and attach the attribute:
  org.w3c.dom.Attr att = document.createAttribute("path");
  att.setValue("M0,0 v100");
  markEl.setAttributeNode(att);

Cheers,

     Robert

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to