> you mean you want to change the color of a shape in your svg file?
>
> (untested syntax)
> 1) lookup the node using methods like
> node=document.getElementById("...")
> 2) set the node attribute like node.setAttribute("fill", "blue");

I'm already doing something quite similar that but it's very slow,
since the SVG has to be transformed into GraphicsNodes.

I'm doing the following to turn off text in the displayed document by
walking the GVT tree:

    private void setTextState( CompositeGraphicsNode cgn,
                               boolean text_state )
        
    {
        
        for ( int i = 0; i < cgn.size(); i++ ) {

            Object object = cgn.get( i );
            Class object_class = object.getClass();

            if ( object_class.equals( CompositeGraphicsNode.class ) )
                this.setTextState( ( CompositeGraphicsNode ) object,
                                   text_state );
            else if ( object_class.equals( TextNode.class ) ) {

                TextNode text_node = ( TextNode ) object;

                text_node.setVisible( text_state );

            }

        }
        
    }

and I was hoping that there was some similar

I'm not interested in saving the changes to the document -- the
document is effectively "read only".

There are Graphics2D objects fed to the paint() methods of the
individual objects but it's not clear to me whence those objects come
or how they are manipulated.

                                                        spl

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

Reply via email to