This morning on Jabber someone mentioned perspective transforms, so I wasted the whole day trying to see if I could write an extension for such a thing. I can't. I'm missing the most important part: the transformation matrix. But if someone can provide a python function to calculate the transformation matrix given the bbox rectangle of a path and an arbitrary destination quadrilateral, I think it might work.
I tried unsuccesfully to borrow code from these two sources: http://cvs.gnome.org/viewcvs/gimp/app/core/gimp-transform-utils.c?view=marku... https://jai-core.dev.java.net/source/browse/jai-core/src/share/classes/javax...
If someone wants to take a stab at the task my unfinished code is here (I'm not sure what state of debugging I left it in): http://www.ekips.org/comp/inkscape/inx/project.py http://www.ekips.org/comp/inkscape/inx/project.inx
In order to use the effect the user must: 1. draw a 4 node path (it makes sense for the path to be closed but I suppose it isn't necessary). 2. adjust those 4 nodes to the corners of the destination quadrilateral. 3. select the control quad before the path that should be transformed. (only those two paths should be selected.)
No, I don't think that this is convenient or intuitive.
Please help, Aaron Spike
participants (1)
-
unknown@example.com