Looking for a SVG renderer

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
ComFreek
Knows some wx things
Knows some wx things
Posts: 30
Joined: Wed Jun 09, 2010 1:13 pm

Looking for a SVG renderer

Post by ComFreek »

Hello to all!

I am looking for a SVG renderer for wxWidgets, of course there should be a cross-platform compatibility.

I found wxCairo but I didn't see anywhere the sources!
At the download page there is only a static library for Windows offered.

The next library I found was wxSVG on SourceForge. But in the ReadMe file in the MinGW directory there's written:
To compile WXSVG with mingw and msys on windows platform, use the render agg23 given in the following CVS :

AGG23 :

cvs -d:pserver:[email protected]:/iae login
type "return" when asking for password

cvs -z3 -d:pserver:[email protected]:/iae co -P agg23
But no tool I have downloaded could find the server/host!

I hope you can help me!
Many thanks in advance!!
ComFreek
User avatar
doublemax
Moderator
Moderator
Posts: 19114
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Post by doublemax »

agg23 probably means antigrain.
http://www.antigrain.com/cvs/index.html
Use the source, Luke!
ComFreek
Knows some wx things
Knows some wx things
Posts: 30
Joined: Wed Jun 09, 2010 1:13 pm

Post by ComFreek »

Thanks.
I've downloaded an archive from here and extracted to wxSVG\src\agg\.
Now I want to compile it, but where do I find the makefile for GCC/MinGW?
ComFreek
Knows some wx things
Knows some wx things
Posts: 30
Joined: Wed Jun 09, 2010 1:13 pm

Post by ComFreek »

Does nobody know an answer?

Thanks.
User avatar
doublemax
Moderator
Moderator
Posts: 19114
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Post by doublemax »

I think you need to build AGG independently from wxSVG, it creates the AGG library which then will be used by wxSVG.
Use the source, Luke!
jbattle
Knows some wx things
Knows some wx things
Posts: 31
Joined: Mon Oct 01, 2007 8:48 pm
Location: Austin, TX

Re: Looking for a SVG renderer

Post by jbattle »

Short version:

How does one build wxsvg using msvc++?

Longer version:

I have written an emulator for an obscure old computer, and I hacked up a rough UI using standard wx controls. Now I want to polish the interface to look as much like the real front panel as I can. Using fiverr.com, I found someone to create svg models for various pieces that I will have my UI code composite together in realtime to create a bitmap which is then blasted to the screen.

Currently, I use visual studio express (2008 on one machine, 2010 on another) to build the emulator. Right now I only have the win32 port working, but my intention is to get it running under osx and maybe linux once I have the interface polished up.

I've dug into things a bit but I don't see how to proceed. I grabbed the agg-2.5 rasterizer lib; its msvc proj files are so old the modern msvc compiler can't convert them, but it was easy enough for me to build a couple examples just by setting up a new project. They worked. However, agg's readme says that library creation is automated for linux/unix, but for windows they just say to include all the source files in your project and compile them along with the other source. I can live with that, but the wxsvg config file seems to want agg supplied as a library, not as source.

I do have cygwin set up on my pc as well, but was unable to build agg using the provided Makefile, as it expected to find /usr/X11R6/include (among other things) but the hierarchy on recent cygwin configurations is different, and /usr/X11R6 doesn't exist. Perhaps I could hack together a nest of symlinks, but it seems like a series of dirty hacks like that would be required to build wxsvg, if it works at all. I'm hoping there is a simpler way.

Thanks for all advice you might have (other than "don't use windoze!")
Jessy V
Earned a small fee
Earned a small fee
Posts: 17
Joined: Sat Feb 18, 2012 9:12 pm

Re: Looking for a SVG renderer

Post by Jessy V »

User avatar
doublemax
Moderator
Moderator
Posts: 19114
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Looking for a SVG renderer

Post by doublemax »

wxSVGFileDC is used to create SVG files, you can't render SVG files with it.
Use the source, Luke!
jbattle
Knows some wx things
Knows some wx things
Posts: 31
Joined: Mon Oct 01, 2007 8:48 pm
Location: Austin, TX

Re: Looking for a SVG renderer

Post by jbattle »

I wasn't able to find the wxsvg forum before, but eventually I did, so I've posted my question there, as it is a more specific forum:

http://sourceforge.net/projects/wxsvg/f ... ic/5050296

Either way, I'm still in the dark. It is a shame -- it seems like a lot of work went into creating wxsvg, but it is poorly documented and doesn't have have enough critical mass to have an active community. If I get it working for windows, I'll see what I can do about adding a description of how I did it. On the help forum for it on sourceforge, a few times over the past five years somone has asked for help getting it running on windows, and some have succeeded, but they didn't leave any record of how they did it.
User avatar
doublemax
Moderator
Moderator
Posts: 19114
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Looking for a SVG renderer

Post by doublemax »

I managed to build the "svgview" that comes with wxSVG with VS2005 by just adding all sources files from AGG 2.4 and wxSVG to the project.

It's a little bit of a mess but if you think it might be useful to you, i can try to patch it up a little bit and send it to you (send me your email address via PM).
Use the source, Luke!
yuri
Earned some good credits
Earned some good credits
Posts: 104
Joined: Thu Apr 09, 2009 4:58 pm
Location: Russia

Re: Looking for a SVG renderer

Post by yuri »

IMHO if you just want to render vector stuff in a crossplatform way than your best bet is opengl (with wxGLCanvas of course). Esp. traditional opengl1.x with transforms, textures, feedback etc. that SVG directly reflect.

And if you really want to render some SVG stuff that is produced in some 3d-party software then
one should understand that current SVG format is quite bloated (you need CSS and JavaScript at least!),
so it is virtually guaranteed that your render library would miss or misinterpret some SVG feature that
your set of SVG files relies on. TinySVG is better, but not much :cry:
Post Reply