xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ananth balasubramanyam <abala...@cs.odu.edu>
Subject SVGOMTextElement
Date Thu, 19 Feb 2004 14:53:39 GMT

Hi,

I have an SVGDocument created from a SVG file. I am trying to
find all the <text> elements and determine their text length and other
properties. Here is my code and it does not seem to work. Am i doing
something wrong :

NodeList textElements = doc.getElementsByTagName("text");
for (int i=0 ; i < textElements.getLength() ; ++i) {
  SVGOMTextElement textElement = (SVGOMTextElement) textElements.item(i);
  SVGOMRect rect = (SVGOMRect) textElement.getBBox();
  System.out.println(rect.getHeight());
  System.out.println(rect.getWidth());
}

thanks in advance,
Ananth

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


Mime
View raw message