From hancock at anansispaceworks.com Wed Mar 19 06:30:44 2008 From: hancock at anansispaceworks.com (Terry Hancock) Date: Wed, 19 Mar 2008 00:30:44 -0500 Subject: [Skencil-users] An old question revisited: Skencil as library / SVG support Message-ID: <47E0A504.80709@anansispaceworks.com> I know I asked this question a *long* time ago, but from the traffic on the list, I think maybe the answer has changed. Some time ago I started work on a plugin project, which was originally for Skencil, but as I wound up using Inkscape for a lot of work, I wanted to make it work with Inkscape. Unfortunately, while I had seriously problems with encapsulating and serializing Skencil-formatted drawing data, I had essentially no ability to *script* Inkscape from Python. So the project was pretty difficult and very inelegant for either of these two applications. I tabled the project, and haven't really looked at it for a year or two because of that. However, if I were to start up again, I'd probably try to make a program which could plug in to either Skencil or Inkscape, and which would use the core Skencil library to do a lot of the high-level graphics operations (e.g. transformations). This requires there to be a separable Skencil graphics library. Then I'd also like to use SVG as my native storage format for drawing libraries (as well as output for the Inkscape plugin, of course). So, I'd need to be able to serialize Skencil drawing data into SVG within the program. I also was interested in something like this for rendering of sk and svg files on a web server, for which it would be undesirable to have any X or GTK requirements in the library. When I tested Skencil in the past, I found it was hard to separate these dependencies out without breaking a lot of stuff. The sk1 project, though, seems to have similar needs for its "uniconvertor" program. So I'm kind of hoping that I might have an easier time of this today. So... here's the question again: what's the best code to start with in order to get a Skencil-based graphics library for use from Python program? Should I work with the Skencil sources or the sk1 sources, for example? Or should I look somewhere else entirely? Cheers, Terry -- Terry Hancock (hancock at AnansiSpaceworks.com) Anansi Spaceworks http://www.AnansiSpaceworks.com From bernhard at intevation.de Wed Mar 19 18:04:18 2008 From: bernhard at intevation.de (Bernhard Reiter) Date: Wed, 19 Mar 2008 18:04:18 +0100 Subject: [Skencil-users] An old question revisited: Skencil as library / SVG support In-Reply-To: <47E0A504.80709@anansispaceworks.com> References: <47E0A504.80709@anansispaceworks.com> Message-ID: <200803191804.26941.bernhard@intevation.de> On Wednesday 19 March 2008 06:30, Terry Hancock wrote: > So... here's the question again: what's the best code to start with in > order to get a Skencil-based graphics library for use from Python > program? Should I work with the Skencil sources or the sk1 sources, for > example? Or should I look somewhere else entirely? Good question. I don't know. I guess if you are using Skenicl, try the 0.7 sources from svn. My wild guess it that it will be reasonable to seperate a library out of this. Bernhard R. -- Managing Director - Owner: www.intevation.net (Free Software Company) Germany Coordinator: fsfeurope.org. Coordinator: www.Kolab-Konsortium.com. Intevation GmbH, Osnabr?ck, DE; Amtsgericht Osnabr?ck, HRB 18998 Gesch?ftsf?hrer Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://lists.wald.intevation.org/pipermail/skencil-users/attachments/20080319/2ad232a5/attachment.pgp From hancock at anansispaceworks.com Wed Mar 19 20:13:07 2008 From: hancock at anansispaceworks.com (Terry Hancock) Date: Wed, 19 Mar 2008 14:13:07 -0500 Subject: [Skencil-users] An old question revisited: Skencil as library / SVG support In-Reply-To: <200803191804.26941.bernhard@intevation.de> References: <47E0A504.80709@anansispaceworks.com> <200803191804.26941.bernhard@intevation.de> Message-ID: <47E165C3.1020405@anansispaceworks.com> Bernhard Reiter wrote: > On Wednesday 19 March 2008 06:30, Terry Hancock wrote: >> So... here's the question again: what's the best code to start with in >> order to get a Skencil-based graphics library for use from Python >> program? Should I work with the Skencil sources or the sk1 sources, for >> example? Or should I look somewhere else entirely? > > Good question. I don't know. > I guess if you are using Skenicl, try the 0.7 sources from svn. > My wild guess it that it will be reasonable to seperate a library out of this. Actually, a related question might be "is this what Cairo is for?" I have to admit I'm still a little vague on what Cairo is. I notice that the history on the sk1 project says it uses a "cairo-based" engine. Does that mean that most of the core Skencil engine has been removed from it? It also mentions a different GUI front-end. Which raises the question of what it shares with Skencil? Maybe I shouldn't really be relying on the Skencil engine internally? I could try to create Cairo-based internal graphics processing and then just target the results to Skencil or SVG or whatever as part of the adaptation in a plugin. What I'm working on is going to need to: 1) Extract graphical content from the selection in the working document 2) Optionally archive that content in a library 3) Generate new content based on library contents & selected content 4) Insert new content into the working document It's complicated enough that I decided to write it with its own separate GUI (PyGTK based). So when you launch it, it will launch its own window. That's why I think it might be possible or worthwhile to adapt it as a plugin to more than one program -- presumably there'd be a relatively small piece of adaptation code (the actual plugin), communicating with a larger application running in another process. Obviously, I haven't worked out all the details. Cheers, Terry -- Terry Hancock (hancock at AnansiSpaceworks.com) Anansi Spaceworks http://www.AnansiSpaceworks.com