
-----Original Message----- From: inkscape-devel-bounces@lists.sourceforge.net [mailto:inkscape-devel-bounces@lists.sourceforge.net] On Behalf Of Maximilian Albert Sent: woensdag 14 mei 2008 19:00 To: inkscape Subject: [Inkscape-devel] LPEs/paths and knotholders
Hi,
I was experimenting with additional knotholders for items carrying an LPE but I'm having problems. What I did was simply to add another case distinction to sp_item_knot_holder() in object-edit.cpp. It checks whether an object has an LPE applied to it, in which case it returns a different knotholder than the standard one.
The handling methods for the new knotholder are minimal (a 'set' method which does nothing and a 'get' method wich just returns a constant point) but Inkscape keeps crashing when handles corresponding to the "ordinary" knotholder are moved. I suspect that the new knotholder somehow interferes with the one that is created for paths in nodepath.cpp but I can't seem to find the exact cause of the problem. The backtraces don't look very helpful to me either since the crash happens in different places and I haven't yet found the common cause (see below for 2 sample backtraces; note that the line numbers may slightly vary due to my changes to the code).
I wonder if anyone has an idea what could be wrong. Really some kind of interference between the two knotholders? How do the knotholders for paths work anyway? Is object-edit.cpp the wrong place to alter them?
Hi Max,
I don't know the exact problem that you are having. But 0aths do not use knotholders, they have nodepath. I think to start, you need to C++-ify Knotholder and make nodepath a subclass of it (and rectangles, 3d-boxes, the lot). This way it is more robust and you can't forget stuff as easily. It might be a lot of work though.
For as far as I remember: Shapeeditor either has a nodepath OR a knotholder. That's a basic assumption built into all code. It cannot have both, so perhaps things go wrong because now it adds both for a path?
When nodepath is a knotholder too, this problem will go away.
Cheers, Johan