Hello,
I have tried to use the current LPE implementation to add connection points to a shape for my GSoC project improving the connector tool. I was considering LPEs because there was already implemented: - parameter values handling; - knot editing via node tool; - LPE stacking; - not interfering with other tools.
So it looked that it would be appropriate to implement connection points (they are sort of knots) by means of LPE without having to "hack" sp-item for this. Still I soon discovered some drawbacks that made me reconsider taking this approach: - LPEs turn everything into paths: that would seem odd to the user that an ellipse is no more editable only because it has connection points; - LPEs are what they say: path effects, so they modify the path in certain ways. On the other side connection points are more an addition to an item, not modifying it in a visible way, but more in a logical way (adds new qualities/features to the items). - You can't add/delete knots yet (in the code I saw comments that suggested it will be done at some point) - I guess that at the moment of design decisions one didn't envision effects that would need this feature.
Yet I saw an example of an effect that does not modify the path (text label) - which in fact gave me some hopes at the begining because it also looked like a "logical" (or should I say virtual) effect, which only added a feature to the path, but did not modify it.
From what I could understand Krzysztof has implemented these PathManipulators,
which seem to extend (am I wrong?) the ShapeEditor or the KnotHolders so as to provide means for every kind of LPE to define its own ways to edit the paths, so I could exploit this for connection points I think.
Since the talk arrived to a potential LPE re-design, could you consider also these "virtual" LPE, which are not in fact path effects, but more path features or qualities?
For example, that text-label effect (which is currently in testing) is not a real path effect, but the author thought it would be nice to show that this can be done with what is currently implemented.
Still there are things that cannot be done with current LPEs: for example having a label (svg:text) on a shape as an LPE would turn that shape into a path (which is wrong), but this could be a usable feature (having labels on shapes that could adapt rotation, horizontal/vertical flip in a proper way). I think I could imagine other uses for these "item features" and I was wondering if Krzysztof's proposal could also handle these.
Regards, Arcadie