Hi all,
I wonder if there is any way how to create SVG file using the wxDC as
the surface (speaking about wxPython 2.8). Thanks for any tips in
advance.
Martin
···
--
Martin Landa <landa.martin gmail.com> * http://geo.fsv.cvut.cz/~landa
Hi all,
I wonder if there is any way how to create SVG file using the wxDC as
the surface (speaking about wxPython 2.8). Thanks for any tips in
advance.
Martin
--
Martin Landa <landa.martin gmail.com> * http://geo.fsv.cvut.cz/~landa
Hi all,
I wonder if there is any way how to create SVG file using the wxDC as
the surface (speaking about wxPython 2.8). Thanks for any tips in
advance.
Martin
–
Martin Landa <landa.martin gmail.com> * http://geo.fsv.cvut.cz/~landa
I don’t recall 2.8 has the wx.SVGFileDC…
… so your best bet is to probably look into…
import gtk
import cairo
import rsvg
or other libs.
I have made wxPython svg viewers and svg2png convertors, but am not sure right off hand how or if these libs have svg writing capability.
On Friday, January 24, 2014 9:39:39 AM UTC-6, Martin Landa wrote:
Hi,
2014-01-24 Metallicow <metaliobovinus@gmail.com>:
I wonder if there is any way how to create SVG file using the wxDC as
the surface (speaking about wxPython 2.8). Thanks for any tips in
advance.I don't recall 2.8 has the wx.SVGFileDC...
... so your best bet is to probably look into...import gtk
import cairo
import rsvgor other libs.
I was already looking at these libraries but didn't managed to write
the code which would work. To be more concrete. I have an application
which uses OGL lib. I want to add functionality to export diagram into
SVG file. Any tips for an example how to write it using wxPython 2.8.?
Thanks in advance, Martin
Hi Martin,
...
I was already looking at these libraries but didn't managed to write
the code which would work. To be more concrete. I have an application
which uses OGL lib. I want to add functionality to export diagram into
SVG file. Any tips for an example how to write it using wxPython 2.8.?
I used OGL for a while but never tried to export the diagram to SVG, had an export to XML.
Have you considered using FloatCanvas instead of OGL?
Werner
On 27/01/2014 08:13, Martin Landa wrote:
Well, all I know from other dev buddies about the specifics is that you need to be able to write a path
basically.
Check out the official svg specs. Inkscape is also a slightly different format that people use also that is open source.
Attached is some basic viewer code for your learning.
Feel free to pass back some OGL wx code if you get it figured out…
-MCow
svg_wx_viewer.7z (5.97 KB)
On Monday, January 27, 2014 1:13:10 AM UTC-6, Martin Landa wrote:
Hi,
I was already looking at these libraries but didn’t managed to write
the code which would work. To be more concrete. I have an application
which uses OGL lib. I want to add functionality to export diagram into
SVG file. Any tips for an example how to write it using wxPython 2.8.?
Thanks in advance, Martin