xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bishop, Michael W. CONTR J9C880" <Michael.Bis...@je.jfcom.mil>
Subject Visibility on an element?
Date Fri, 15 Sep 2006 17:29:18 GMT
Is there any way to determine whether or not an SVG is visible?  I'm
looking for a global solution.  I'm trying to work with layers:


<g style="display:none"> is the way I indicate a layer is not visible.
I'm sure there are other ways to turn it off as well.


However, for visible layers:


<g> and <g style="display:block"> would work and I'm sure there are
other ways.


I'm looking for a way to determine visibility regardless of how the SVG
document is created?  If I parse the attributes (which I currently do)
inconsistencies can arise.


public static boolean isVisible(Element element) {




Is there a way to find this out?  Maybe at a lower-level?  Is there a
point where Batik decides whether or not to draw a particular object?
Obviously a <g> tag isn't typically "drawn" anyway so this setting would
apply to its children which may complicate the solution.


Michael Bishop

View raw message