Lionel Villard wrote:
Hi all,
I'm wondering if it's really simple to implement those methods. I'm
pretty new in the Batik code, so
correct me if I'm wrong. It seems to me that because non-formatted
values are clearly separated from formatted/dynamic values it's not easy
to make the latter available at the OM level. Each OM object is
*temporarily* associated to GVT object where formatted and dynamic
values are available.
I'm curious to know how you would do it. Can you give us some hints?
Well, there are two things. First it's not clear that
'getTextLength()' is associated with any dynamic value. It is
supposed to be tied to the 'textLength' attribute, which is very
easy to associate (as you seem to have seen).
The only interesting question is what should it return if
textLength isn't set? One could argue that it should return
the computed text length (i.e. the value of getComputedTextLength()).
This would of course then make the two methods twins of each other.
If textLength is set the computed text length is supposed to be
the value of textLength, and if textLength isn't set then it returns
the value of get computed text length.
In any case if textLength isn't set then just call
getComputedTextLength.
Thanks
Lionel
Hi Harald,
Harald Kuhn wrote:
I am trying to get the rendered length of a SVG Text Element. As far
as i understood, the getTextLength() Method of SVGTextContentElement
is supposed to do this.
No you want the "getComputedTextLength" function, "getTextLength"
is tied to the "textLength" attribute (which should, if set, be the
same as the computed text length but for most content it is not).
The "getComputedTextLength()" function _is_ implemented.
However when i tried this, a RuntimeException was thrown and by
looking at the code I found out that the Method returns an
implementation of AbstractSVGAnimatedLength where getDefaultValue()
and getAnimatedValue() are not implemented. My question is, wether
there are any plans for implementing this method(s) ?
There is (since it's pretty simple for Batik, in fact I'm not
sure why it isn't already). However, as I said above it really
wouldn't help you much ;)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]