Tonny Kohar-2 wrote:
>
> Those classes are already initialized by Batik when you enabling the
> boot css stuff. In Batik wiki / website there should be a
> documentation regarding SVG boot css (forget the url), from there you
> can get access to the bridge and bridgeContext class.
>
Yes I am nearly there...
Yes I realize now that I have to "boot the SVG and CSS DOM."
Basically this means that Batik is initialized with all the visual
attributes of the SVG document, like for example the rectangle bounds of a
text element.
"boot the SVG and CSS DOM" instructions here:
http://wiki.apache.org/xmlgraphics-batik/BootSvgAndCssDom
However batik works with W3C DOM java interfaces.
I am working with JDOM so I need to convert my JDOM text element to a DOM
text element.
There is a JDOM utility class to do this - DOMOutputter
But there is a problem: I get the DOM Document object OK from the
DOMOutputter
BUT I get null returned when I use getElementById to get the text element
object (I have the 'id' of the element so expect this to work)
This problem is discussed in separate Nabble JDOM Forum thread
http://www.nabble.com/DOMOutputter-problem%3A-getElementById-to-get-DOM-Element-from-resultant-DOM-Document-returns-null-to15616657.html
Any ideas?
I'm guessing it might be a namespace problem or formatting problem related
to how I present the 'id' value.
I want to stick with JDOM (a lot of my code relies upon it).
Tonny Kohar-2 wrote:
>
> Did you try elt.getBBox(); // check the API, the syntax is from my memory
>
I haven't tried this. I can't do this until I've been able to get the DOM
Element as described above.
--
View this message in context:
http://www.nabble.com/How-to-get-bounds-of-text-element-in-SVG-doc-%28dimensions-size-width%29-tp15590430p15630512.html
Sent from the Batik - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]