text lenght

from Andreoli Carlo,
here there is a little tip to calculate the exact length of a text with 
Java/ECMAscript:

.......
newText=svgDocument.createElement("text");
newText.setAttribute("x",100);
newText.setAttribute("y",50);
valore=svgDocument.createTextNode("ciao");
newText.appendChild(valore);
long=newText.getEndPositionOfChar(newText.getNumberOfChars()-1);
longX=long.x;
........

in longX we will have the exact length of the text put in newText object.
Hope this will help someone :)

_________________________________________________________________
Filtri antispamming e antivirus per la tua casella di posta 
http://www.msn.it/msn/hotmail

Received on Monday, 2 February 2004 03:31:58 UTC