xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amanda Ge" <...@marvell.com>
Subject RE: Seperate Layers in SVG
Date Tue, 22 Jun 2004 01:45:50 GMT
Search "layering images" in users list for past posts.

I kind of think if you have all layers in SVG, there is not much difference in size (on disk
or in memory) if the layers are in one SVG file or several (if they are all 'on'). 
For efficiency, I thought about using Java2D layer to "annotate" SVG, for example drawing
grids, dots etc which are transient artifacts in my case. But seems more work to deal with
transforming both layers when resize windows/ zooming etc. I end up working in one screen
coordinates from one SVG for everything. 

P.S. I was new to swing and didn't realize JLayeredPane has no LayoutManager. I setPreferredSize()
as usual and didn't see layered SVG show up. All the past posts of course says JLayeredPane
works and not mention this swing side newbie problem.

-amanda

-----Original Message-----
From: Chimera [mailto:chimera@ennersea.net]
Sent: Monday, June 21, 2004 11:36 AM
To: batik-users@xml.apache.org
Subject: Seperate Layers in SVG


Opinion wanted:

Which would be the best way to achieve the following in Batik?
I want to load a graphic as a background 'layer', and then load other 
'layers' above this background layer, being able to toggle them on/off 
in regards to visibility, as well as loading these layers from file menu 
actions.

1.  Can Batik, with proper transparency settings in the source svg 
files, display multiple svg documents on top of one another?  All of the 
documentation and examples are simplified for obvious reasons, so this 
doesn't seem to be touched on that I can see.

2.  Is it preferrable to composite a single SVG file in the application 
and do tracking of layers as different collection objects (array, 
vector, etc)?   Thus, if one overlay is toggled 'off' visibility-wise, 
iterate through the array of objects, make them invisible, repaint the 
screen.   Are there speed concerns between this approach and the (if 
possible) multiple document/multiple layer approach?

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


---------------------------------------------------------------------
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