Hello,
I am creating a application with Batik and I have the following
problem. I am buidling a DOM Tree and I want to know the bounding box
of the text-Elements while I am building the DOM. I need that
information, because I want to create a fitting rect as a background
for every Text-Element and for other layout-reasons.
Can someone help me? I already searched in the Batik mail-archive, but
didn't find a solution for my problem.
Here is my code:
DOMImplementation impl = SVGDOMImplementation.getDOMImplementation();
String svgNS = SVGDOMImplementation.SVG_NAMESPACE_URI;
SVGOMDocument doc = (SVGOMDocument)impl.createDocument(svgNS, "svg",
null);
Element text = doc.createElementNS(svgNS,"text");
Text textNode = doc.createTextNode("a text");
text.appendChild(textNode);
// here I want to know the bounding box
Possible?
Thank you,
Tjorven Lauchardt