Hi Gerrit,
"G33K" <[email protected]> wrote on 10/12/2009 04:09:26 AM:
> > It seems that SVG elements that have their display property set to
> > "none" don't get a GraphicsNode when the GVT tree is constructed.
>
> Update: I found an entry in the W3C spec which says that elements with
> display:none "are not present in the rendering tree":
Correct, this is at least partly why GN aren't built for
these elements/subtrees.
> However, this limitation doesn't seem to hold for the visibility
property
> mentioned in the same section of the spec. But in my tests, elements
with
> visibility:hidden (without display:none) still don't seem to get a
> GraphicsNode. Is there a way to force a generation here?
Batik absolutely does create GN for elements that only have
'visibility:hidden'. I know that because we have tests to ensure
that pointer/key events get sent to those elements.
> Or am I missing something important?
It would seem so. Can you post an example of the SVG document
you are trying to work with, along with the code you are using?
I feel I should also mention that I have yet to encounter anyone
that has tried to manipulate the GVT tree directly that wouldn't have
been better off manipulating the DOM. So you might want to rethink or
ask about why you need access to the GN's at all. Your stated reason
doesn't seem to rise to the level needed, you can easily toggle the
visibility of nodes through the DOM.