Hi, I' d like to ask if there is perhaps some sort of affine transformation library available to the Inkscape Python scripts?
So far, I only found the file simpletransform.py, which is quite useful, but not very comprehensive. The transformation stuff already has excessive support in the Inkscape C++ code. Are there any Python bindings for that?
Right now, I am primarily interested in getting pretty constructor functions for defining rotations and scaling, without having all the mathy matrix clutter in my code. If none are available, I could add those to simpletransform.py myself.
Cheers, Gerrit
On Thu, 2009-03-26 at 04:21 -0700, G33K wrote:
Hi, I' d like to ask if there is perhaps some sort of affine transformation library available to the Inkscape Python scripts?
So far, I only found the file simpletransform.py, which is quite useful, but not very comprehensive. The transformation stuff already has excessive support in the Inkscape C++ code. Are there any Python bindings for that?
Right now, I am primarily interested in getting pretty constructor functions for defining rotations and scaling, without having all the mathy matrix clutter in my code. If none are available, I could add those to simpletransform.py myself.
Aren't there Python bindings for lib2geom somewhere?
--Ted
-----Original Message----- From: Ted Gould [mailto:ted@...11...] Sent: Monday, March 30, 2009 04:50 To: G33K; Aaron Spike Cc: inkscape-devel@lists.sourceforge.net Subject: Re: [Inkscape-devel] Affine Transformations in Python
On Thu, 2009-03-26 at 04:21 -0700, G33K wrote:
Hi, I' d like to ask if there is perhaps some sort of affine transformation library available to the Inkscape Python scripts?
So far, I only found the file simpletransform.py, which is quite useful, but not very comprehensive. The transformation
stuff already
has excessive support in the Inkscape C++ code. Are there
any Python
bindings for that?
Right now, I am primarily interested in getting pretty constructor functions for defining rotations and scaling, without
having all the
mathy matrix clutter in my code. If none are available, I could add those to simpletransform.py myself.
Aren't there Python bindings for lib2geom somewhere?
I had the same thought Ted; indeed work has been done to get python bindings for lib2geom (called py2geom). One of the problems has been to get it working on Windows. I succeeded in that, so now there are 2 problems left: 1. getting py2geom standard in Inkscape build system. This is not an easy problem I think. 2. incomplete bindings. The 2geom bindings are incomplete, but that might not be too much a problem at start. It will definitely be a big boost when Inkscape started using py2geom.
I hope we can add py2geom support in Inkscape 0.48. (we really shouldn't try to get this in 0.47). Or... Perhaps we should not supply py2geom with Inkscape at all, and have users install it by themselves? (not easily done on Windows at the moment though).
On Mon, 2009-03-30 at 11:10 +0200, J.B.C.Engelen@...1578... wrote:
I hope we can add py2geom support in Inkscape 0.48. (we really shouldn't try to get this in 0.47). Or... Perhaps we should not supply py2geom with Inkscape at all, and have users install it by themselves? (not easily done on Windows at the moment though).
Heh, what is easy on Windows? ;)
I think this is a general thing that I'd like to do, I'd like to get the extensions into their own project, with their own dependencies, and their own release schedule. The reality is that they could probably release much faster than the core Inkscape, and be compatible across more versions of Inkscape than just one. We could then make a package that required the py2geom bindings for people who required it.
--Ted
-----Original Message----- From: Ted Gould [mailto:ted@...11...] Sent: maandag 30 maart 2009 15:32 To: Engelen, J.B.C. (Johan) Cc: g99999k@...2136...; aaron@...749...; inkscape-devel@lists.sourceforge.net Subject: RE: [Inkscape-devel] Affine Transformations in Python
On Mon, 2009-03-30 at 11:10 +0200, J.B.C.Engelen@...1578... wrote:
I hope we can add py2geom support in Inkscape 0.48. (we
really shouldn't
try to get this in 0.47). Or... Perhaps we should not
supply py2geom
with Inkscape at all, and have users install it by themselves? (not easily done on Windows at the moment though).
Heh, what is easy on Windows? ;)
:-)
I decided to work on this this evening, the result: http://wiki.inkscape.org/wiki/index.php/Lib2geom_py2geom Windows users can download binaries that I built :-) Turns out it is pretty easy on windows anyway :-O Have fun with py2geom guys!
Cheers, Johan
J.B.C.Engelen@...1578... wrote:
I decided to work on this this evening, the result: http://wiki.inkscape.org/wiki/index.php/Lib2geom_py2geom Windows users can download binaries that I built :-) Turns out it is pretty easy on windows anyway :-O Have fun with py2geom guys!
That's fantastic. Could you tell us how you did it? (Or better yet, write it up in the wiki?) I hope this gets more people interested in working on py2geom. It would be very exciting to see the wrapper mature.
Aaron Spike
-----Original Message----- From: Aaron Spike [mailto:aaron@...749...] Sent: Thursday, April 02, 2009 03:30 To: Engelen, J.B.C. (Johan) Cc: inkscape-devel@lists.sourceforge.net Subject: Re: [Inkscape-devel] Affine Transformations in Python
J.B.C.Engelen@...1578... wrote:
I decided to work on this this evening, the result: http://wiki.inkscape.org/wiki/index.php/Lib2geom_py2geom Windows users can download binaries that I built :-) Turns
out it is
pretty easy on windows anyway :-O Have fun with py2geom guys!
That's fantastic. Could you tell us how you did it? (Or better yet, write it up in the wiki?) I hope this gets more people interested in working on py2geom. It would be very exciting to see the wrapper mature.
It's already in the wiki for quite a while :) http://wiki.inkscape.org/wiki/index.php/Lib2geom_FAQ 2geom's cmake script does all the work of building (and installing if you want) py2geom, once you have figured out how to make the "boost-python-binary". Back then I sent a mail to ishmal about putting the "boost-python-binary" in our devlibs, but I guess it got snowed under. And I forgot about it too. So the 'work' of last evening was not actually making py2geom build or work; it was writing something about py2geom on the wiki and finding a place where to put the binaries.
participants (4)
-
unknown@example.com
-
Aaron Spike
-
G33K
-
Ted Gould