[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: Re: Support SVG Export

From: Helder Magalhães <helder.magalhaes_at_gmail.com>
Date: Mon, 15 Feb 2010 09:05:46 -0800 (PST)

I'm arriving somehow late to the debate, and am replying at once to several of the thread's messages, so sorry if it sounds weird... ;-)

[codedread]
> It came to my attention that TortoiseSVN can export WMF for the tree/history.
> Would it be possible to support export of SVG?

I'm using TSVN for a more than a couple years now and never had noticed the neat WMF export, so well spotted, Jeff. ;-)

But I haven't been using the tree/history features much, so this may be something worth investigating... :-)

Can you disclose on the use-case(s) a bit? Simply allowing direct SVG export (as a simple a feature enhancement basis, for convenience) or exporting this information for "real" use in SVG-Edit, I'm guessing...? (For documentation, visual evolution of source code, etc.) ;-)

[codedread]
> Looks like there are several options:
> * use a library that converts from WMF to SVG. Some links here: http://openclipart.org/wiki/SVG_Tools
> * use something like this to convert GDI+ directly to SVG: http://www.jbrowse.com/svgnet/
> (I would prefer the more direct approach as it seems that conversion from WMF might introduce errors)

+1 on directly exporting to SVG. :-)

I've taken a quick look to SVGNet and it really seemed in scope here...

[simonlarge]
> I had a quick look at the links. SVGNet is written as C# and I'm not
> sure how that fits with the rest of the C++ application.

Too bad for SVGNet being in C#... :-|

Maybe one could use it as template and "unsharp" it. :-)

> Also it was
> last updated in September 2003, so not what you call supported.

Note that SVG is around for a while (since 1999~2000) so a library of 2003 can be either outdated or simply rock stable. I haven't dig down which of the two! ;-)

> The only one that looks promising is Cairo, and that would require
> rewriting everything that currently uses GDI+ to use Cairo instead. Or
> am I missing something?

I guess such a rewrite wouldn't be necessary. I've crawled a bit in TSVN source code and I've narrowed the thing to CRevisionGraphWnd::SaveGraphAs (around line 780 of src/TortoiseProc/RevisionGraph/RevisionGraphWnd.cpp [1]). It seems that there's a neat file abstraction for WMF, CMetaFileDC [2], which takes care of "drawing" stuff to a buffer which is then serialized to file.

Taking from Robin Berjon's Canvas-SVG Bridge [3], which is basically this applied to HTML5 Canvas, it should be fairly easy to build such thing. :-)

> Are you volunteering?

Not sure about Jeff, but if someone would find/take the time to build such project, I'm volunteering to help develop/test text support: I'm aware that this is one of the hardest/trickiest things to put together. :-)

[w0rms]
> N.B.: I also tried to use the most recent Batik transcoder, but I'm unable to find how to use it/program it...

AFAIK, there's not a straight application for using the WMF transcoders shipped with Batik. Probably one will need to provide the glue for using the provided API [4]. ;-)

Cheers,
 Helder

[1] http://tortoisesvn.tigris.org/svn/tortoisesvn/trunk/src/TortoiseProc/RevisionGraph/RevisionGraphWnd.cpp (use guess:"" as credentials)
[2] http://msdn.microsoft.com/en-us/library/427wezx1%28VS.80%29.aspx
[3] http://berjon.com/hacks/canvas-getsvg/
[4] http://xmlgraphics.apache.org/batik/using/transcoder.html

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2447788

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2010-02-15 18:05:53 CET

This is an archived mail posted to the TortoiseSVN Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.