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 Stefan Rotman <ro...@microweb.nl> on 2002/05/22 17:27:34 UTC

Repaint problem after removing last "visible" component

Hi,

If i have an SVG document, and i want to remove visible elements (rectangle, 
circle, polygon, etc.) i use the following method.

>>    private JSVGComponent comp;
>>    ...
>>    public void remove(final Element element) {
>>        UpdateManager updateManager = comp.getUpdateManager();
>>        RunnableQueue rq = updateManager.getUpdateRunnableQueue();
>>        rq.invokeLater(new Runnable() {
>>            public void run() {
>>                document.getDocumentElement().removeChild(element);
>>            }
>>        });
>>    }

Now this all works fine, until i remove the last "visible" element. The 
elements is now no longer in the dom tree, but my canvas is not repainted 
correctly. My guess is that because the DOM tree now contains no more elements
that should be painted, this gives a problem with the ALWAYS_DYNAMIC document 
state of my canvas, but what do i need to do to let this be repainted 
correctly?!?

Greetings,
Stefan.

PS. Keep up the good work!


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


RE: Repaint problem after removing last "visible" component

Posted by Thierry Kormann <tk...@ilog.fr>.
> Now this all works fine, until i remove the last "visible" element. The
> elements is now no longer in the dom tree, but my canvas is not repainted
> correctly. My guess is that because the DOM tree now contains no
> more elements
> that should be painted, this gives a problem with the
> ALWAYS_DYNAMIC document
> state of my canvas, but what do i need to do to let this be repainted
> correctly?!?

This bug is fixed now.


Thierry.


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