Help with SVG implementation

Nicholas Bastin nbastin at mac.com
Fri Nov 30 02:25:15 PST 2007


On 30 Nov , 2007, at 05:02 , Klaas Holwerda wrote:

> untergasser at gmail.com wrote:
>> Hi,
>> I would like to write an application for data analyses which should
>> generate and display SVG output.
>
> Viewing SVG is best done via a browser.

Why would you say something like this?  Working interactively with an  
SVG canvas is especially useful in a large set of applications.

> As far as I can see two libraries
>> exists for that - wxSVG and wxArt2D.
>> Can anybody shortly comment if he used one of both? Why not the other
>> one? What are the big differences?
>
> wxSVG is a plain wxDC implementation which is used as a drawing  
> context.
> So whatever you have to draw, will come out as SVG (but a simple  
> form and flat).
> Also you are limited by what wxDC can do/draw, while SVG in general  
> can contain very complex drawings.

A wxDC can draw anything, if you're willing to put the effort into  
it.  wxArt2d is especially handy because it continues to treat your  
drawing as objects (at almost any level of hierarchy) even after  
placing it on the DC, so you can hook it to move things around pretty  
easily - basically what you'd do if you had to write it yourself, but  
in this case, someone already did it for you.. :-)  wxSVG appears to  
mostly be intended for rendering SVG into a DC, but not really working  
with it except at the individual element level, which is too fine- 
grained for managing most user interactivity.  If that's all you need,  
it may or may not be better than wxArt2D (someone who knows better,  
feel free to correct me - I'm just going off what documentation I  
could find).

--
NIck




More information about the wx-users mailing list