Hervé Girod wrote:

>> I tried to setup the OutputStream with UTF-8, but it doesn't change
>> anything. It is really a minor problem, because the output SVG file can be
>> opened and shows what it must, but it is slighly different from the
>> original, at least when Unicode / non ASCII characters are used...

> ...there is essentially no way for Batik to know which chars should be
written which way.   
> So my basic response is that if you are happy with the 'fix' then
> feel free to continue to use it (you may want to rename the class
> and/or move it into a package you control), but I don't think it is
> appropriate for the Batik package to incorporate it.
 
You're right, I haven't thought about that.
By the way, I have another problem, I'm sure entirely due to me. I subclassed the DOMViewer class in order to be able to modify the SVG Document and its associated GVT tree when performing actions on the tree. The first actions I tried to implement was deletion in the GVT tree. I basically use the following approach :
 
- first declare the JSVGCanvas I will use as DYNAMIC before loading the document :
            JSVGCanvas canvas = new JSVGCanvas();
            canvas.setDocumentState(JSVGCanvas.ALWAYS_DYNAMIC);
            canvas.setDocument(doc);
 
- then call this piece of code when clicking delete on a node of the DOMViewer tree :
            Node domNode = ((NodeInfo)treenode.getUserObject()).node;
            Node parentNode = domNode.getParentNode();
            parentNode.removeChild(domNode); 

And it is not working. I invariably have a LOT of exceptions in removeChild in Batik code (stack pointer, etc...). I'm sure I haven't understand at all how to use dynamic documents, so my approach must be wrong, but where ? 

 

 

Reply via email to