![](https://secure.gravatar.com/avatar/bb65b6b3a109d97cf9f8d6c014ede042.jpg?s=120&d=mm&r=g)
On Tue, Oct 7, 2008 at 7:59 PM, jf barraud <jf.barraud@...400...> wrote:
This (good!) solution is user friendly, as your lpe parameters nicely move along with your object. However, it implies some limitations (please invalidate if I'm wrong!): I think it prevents from sharing lpes accross different objects, as if one is moved but not the other, which one should be followed by the lpe-parameters? Note that atm, lpe are automatically forked/made unique when you move one object, and I guess that's the reason (?right?).
Exactly.
A related (but different) question is about "cloned" path parameters (i.e. references). I might be wrong, but I think path-reference parameters are not transformed atm. (Marginally, one can even think of lpe that depend on the object location, but not relatively to a path or point parameter --- "underlying objects color" for instance?!?--- in which case, transfering the transform to parameters is useless; hmmm! I agree, this is pure abstraction ;-)
Well, I see nothing wrong with a LPE that reflects some other objects in the drawing or the background under it. After all, it is completely Inkscape's discretion how to construct the LPE path. Although this will require an extension of the API that LPEs use, but it's doable.
One easy workaround is to add a "lpe-transform" at the end of the lpe-stack whenever the object is transformed (of course, if the last lpe is already a (non shared) transform-lpe, we should just update it instead of adding a new one). This is easy to implement and solves the issue. I think it is a bit cleaner as pes don't have to care about transforms anymore, etc...
I think this is a good idea. It is btw similar to how we handle gradients: we have a "vector" gradient which contains color stops and can be shared, and each object has its own "private" gradient which specifies the coordinates of the gradient line for this object. When object is transformed, only its private gradient may need to be updated with the transform.
The (serious) drawback however, common to all solution you can think of, is that if the lpe-parameters do not follow the object anymore, you'll have to look for them all the time and everywhere: if you applied your lpe somewhere, and moved your object a lot, at edition time you'll wonder why the lpe parameter shows up at the other corner of the page, which was the original place, but you completely forgot about. :-(
Why can't we show the parameters already transformed with the "lpe-transform" at the end of stack, so they show up where the object is?
As a conclusion, if we want to keep track of the objects transforms *and* allow lpe to be shared, lpe must be able to strore object specific information at objects level (not in the lpe itself in the defs). Maybe we could add one more attribute to the object, where lpes could register all the data they need (this would be usefull for other purposes anyway).
I don't think an extra attribute is needed. Just add another "private" lpe to the list in inkscape:path-effect so it stores the transform, and then maybe other object-specific lpes if necessary.