You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Eric Delacroix <ed...@hotmail.com> on 2003/04/27 12:41:03 UTC

image rendering process

hello,

I'm still in my look for theoretical explanation. I'd like to be sure for 
each steps for the rendering process. Can I tell that :
first : usage of SAXDocumentFactory, for parsing de svg file
second : build a DOM tree (with SVGGraphics2D?)
third : bound it with GVT tree (with the bridges?)
fourth : read every graphic object and draw it with awt functions in an 
Imagebuffer (again with SVGGraphics2D??)
and finally draw the graphic context on the JSVGComponent??
I'm a bit confused with the drawing of the shapes... when did it happen, is 
it in a buffer?
And which tree (between DOM and GVT) is used for drawing?
That's quite abstract, I know, but I try to explain at least a part of the 
way for batik to work, and I'd like to be sure of what I could say :)
Thank you


Eric Delacroix
Faculté des Sciences appliquées
ULB Brussels




_________________________________________________________________



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


Re: image rendering process

Posted by Vincent Hardy <vi...@sun.com>.
Hi Eric,

You can attach listeners for the various processing steps of a document. 
For example, you can attach an SVGDocumentLoaderListener to know when a 
document load started and when it is complete. There is the 
GVTTreeBuilderListener as well to follow the steps of a GVT Tree 
building process and there is a GVTTreeRendererListener to follow the 
progress of a GVT Tree rendering.

Graphic objects are read in the bridge module. For example, see the 
SVGRectElementBridge to see how a rectangle and its attributes are parsed.

Graphic objects are rendered in the GVT tree. For example, see the 
ShapeNode class.

Finally, the swing component uses a GVTTreeRenderer to render a GVT 
tree. The GVTTreeRenderer is a Thread that uses an ImageRenderer 
(org.apache.batik.gvt.renderer.ImageRenderer) for rendering.

I hope these pointers help,
Vincent.
Eric Delacroix wrote:
> hello,
> 
> I'm still in my look for theoretical explanation. I'd like to be sure 
> for each steps for the rendering process. Can I tell that :
> first : usage of SAXDocumentFactory, for parsing de svg file
> second : build a DOM tree (with SVGGraphics2D?)
> third : bound it with GVT tree (with the bridges?)
> fourth : read every graphic object and draw it with awt functions in an 
> Imagebuffer (again with SVGGraphics2D??)
> and finally draw the graphic context on the JSVGComponent??
> I'm a bit confused with the drawing of the shapes... when did it happen, 
> is it in a buffer?
> And which tree (between DOM and GVT) is used for drawing?
> That's quite abstract, I know, but I try to explain at least a part of 
> the way for batik to work, and I'd like to be sure of what I could say :)
> Thank you
> 
> 
> Eric Delacroix
> Faculté des Sciences appliquées
> ULB Brussels
> 
> 
> 
> 
> _________________________________________________________________
> 
> 
> 
> ---------------------------------------------------------------------
> 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