Hello everybody,

I have been trying to find the way to add an "id" attribute to a rectangle
using SVGGraphics2D. I got the code shown below. But I haven't found the way
to do it. It looks as it is an old issue but i couldn't find a concrete
answer.

thanks for your help.

public void paint(SVGGraphics2D g2d) {
        EventTarget target;
        g2d.setPaint(Color.red);
        g2d.fill(new Rectangle(10, 10, 100, 100));
        Element root=svgDocument.getDocumentElement();
        g2d.getRoot(root);

}

Reply via email to