![](https://secure.gravatar.com/avatar/15f5e6abf26f57e1838c29a8356ce7f8.jpg?s=120&d=mm&r=g)
-----Original Message----- From: bulia byak [mailto:buliabyak@...400...] Sent: vrijdag 10 oktober 2008 7:01 To: jf barraud Cc: inkscape-devel Subject: Re: [Inkscape-devel] lpe and transforms
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.
LPE's already don't need to think about transforms. There is only one LPE that does something that is abnormal (curve stitch), the rest just calls the default, apparently it was copied a number of times in the source. (I'll clean it up when I'm home).
I figured adding an LPE at the end of the stack would be the same as just writing to the transform attribute of a path. Turns out this is the case, and actually bugs for subpath stitching! (set preference to optimized, scale a path with a curved stitch applied, then check with scaling when preference is set to preserved. the results are different) I.o.w. I think that paths with an LPE applied should always use the "non-optimized" or "preserved" transform attribute setting (found in preferences). So we should remove the Effect::transform_multiply method completely, and always use preserved transforms for paths with LPE.
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?
This is already the case for the path's transform attribute.
So I think back then I made a solution for a non-existing problem. Probably just using the path's own transform attribute instead of propating the transform to the LPEs will speed up things by a lot too! (notably transforming a spiro path)
Thanks for uncovering the issue JFB :)
Johan