Sand Print wrote:

Thank you both for your reply.
I looked at the steps link, Cameron- it helped.
Following on that question, I am trying to parse an SVG file using a very light parser. - so I get all the elements and attributes in the SVG file. Now I need to stored it in some local data structure which can go as an input to the renderer.

The renderer essentially is the GVT tree. The input used to construct the GVT tree is the Batik DOM (which has support for CSS and various other stuff needed for SVG). The bridge package takes the DOM and builds the corresponding GVT tree.

I was going through the GVT classes. Can you tell me how the SVG document is stored for the rendering process.

The Bridge builds a tree of GVT nodes from the SVG. If you _really_really_really_ wanted to you could write code to build your own GVT tree (essentially a duplicate of the Bridge) but since this is much of the work of Batik doing a complete job would be really hard.

   It is also worth pointing out that SVG makes fairly heavy use
of forward/backwards references (gradients, use, patterns, clip,
etc).  For these you really need to store the whole tree.

   So I would suggest using your 'light parser' to build the
Batik DOM (if your parser supports SAX 2 with namespaces you
can simply tell Batik to use it instead of Xerces - the default).


Thanks a lot,
Sandy.


*/Cameron McCormack <[EMAIL PROTECTED]>/* wrote:

    Hi Sandy.

    Sand Print:
     > I am new to Batik and have just started exploring it.
     > I am trying to understand the sequence of steps that the SVG file
    goes
     > thru to get rendered as an image.
     > When the SVG file gets parsed, how is it stored and how does the
     > renderer get this data? What I mean is that is it stored as some
     > datastructure that the renderer accepts?
     >
     > Urgently require an answer. Pls help.

    Have a look at the JavaDoc for the JSVGComponent class. It explains
    the steps taken when an SVG document is loaded.

    http://xml.apache.org/batik/javadoc/org/apache/batik/swing/svg/JSVGComponent.html

    Cameron

-- Cameron McCormack
| Web: http://mcc.id.au/
| ICQ: 26955922


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]

Do you Yahoo!?
Vote for the stars of Yahoo!'s next ad campaign! <http://advision.webevents.yahoo.com/yahoo/votelifeengine/>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to