Re: Rendering works, most of the time...

[email protected]
Newsgroups gmane.text.xml.batik.user
Message-ID <OF37F72BAA.EE49B895-ON8525788E.00385650-8525788E.0038E41A@knotes.kodak.com>
Hi Dennis,

Dennis Hendriks <[email protected]> wrote on 05/10/2011 10:35:13 AM:

> For a simulator I'm writing I'm using Batik to visualize the model being 

> simulated. The simulator loads an SVG file and after each simulation 
steps, 
> it calls some hooks that update the SVG document, and after that it 
redraws 
> the canvas. The canvas paint event renders the graphics node to a 
> BufferedImage, after which the data is passed to SWT to render it on the 

> SWT canvas.

        What you say 'canvas' do you mean the Batik JSVGCanvas?  Or your 
personsal SWT Canvas?

> Does anyone know what I might be doing wrong, that causes nothing to be 
> drawn? Under what circumstances could graphicsNode.paint(g) have the 
effect 
> that nothing is drawn?

        It is essential that you not modify the document while a paint is 
in 
progress.  If the renderer detects this condition it will generaly abort
since it's impossible to get a reasonable result.

        The only other thing I can think of would be if the clip (or other
attributes) of the Graphics2D was weird.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.