xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Neumann <neum...@karto.baug.ethz.ch>
Subject Re: idea to show modified source in Batik
Date Fri, 11 Feb 2005 09:02:16 GMT
great!

thomas is that code ok to be used in the Squiggle browser? I guess that 
quite a few developers would benefit from that feature.

sorry, I am not a Java programmer - I can't tell if one needs anything 
more to provide a view of the complete modified DOM.

Thanks,
Andreas

Archie Cobbs wrote:

>Andreas Neumann wrote:
>  
>
>>ASV, however, has one useful feature (available through an XML 
>>processing instruction) that is currently not available on Batik: to 
>>save the current state of the DOM to a new SVG file. Yes, there is the 
>>DOM viewer to see the current DOM, but in some cases, it would be useful 
>>to get the full modified DOM and to be able to save it to a file again.
>>    
>>
>
>Interesting.. we added this feature to our application's "debug menu"
>and it has proven very useful. The implementation is easy, something
>like:
>
>         JSVGCanvas canvas = ...
>         File file = ...
>
>         canvas.getUpdateManager().getUpdateRunnableQueue().invokeAndWait(
>             new Runnable() {
>                 public void run() {
>                     try {
>                         TransformerFactory.newInstance().newTransformer()
>                           .transform(
>                             new DOMSource(canvas.getSVGDocument()),
>                             new StreamResult(file));
>                     } catch (Throwable t) {
>                         t.printStackTrace().
>                     }
>                 }
>             }
>         );
>
>-Archie
>
>__________________________________________________________________________
>Archie Cobbs      *        CTO, Awarix        *      http://www.awarix.com
>
>
>*
>Confidentiality Notice: This e-mail message, including any attachments, is for the sole
use of the intended recipient(s) and may contain confidential and privileged information.
Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the
intended
>recipient, please contact the sender by reply e-mail and destroy all copies of the original
message.
>*
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
>For additional commands, e-mail: batik-users-help@xml.apache.org
>
>  
>


-- 
--
---------------------------------------------- 
Andreas Neumann - Department of Cartography 
Swiss Federal Institute of Technology (ETH) 
ETH Hoenggerberg, CH-8093  Zurich, Switzerland 
Phone: ++41-1-633 3031, Fax: ++41-1-633 1153 
e-mail: neumann@karto.baug.ethz.ch 
www: http://www.carto.net/neumann/ 
SVG.Open: http://www.svgopen.org/ 
Carto.net: http://www.carto.net/


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


Mime
View raw message