-----Original Message----- From: bulia byak [mailto:buliabyak@...400...] Sent: Monday, January 12, 2009 01:51 To: jf barraud Cc: Engelen, J.B.C. (Johan); inkscape-devel@lists.sourceforge.net Subject: Re: [Inkscape-devel] LPE cleanup
On 1/11/09, jf barraud <jf.barraud@...400...> wrote:
That is what makes me think lpe should be allowed to
register "local"
parameters. A new object attribute could be defined (something like "lpe-local-params"), where lpe would register all the data
they need.
Moreover, I think we'll need this sooner or later to fix
the transform
issue (lpe cannot be shared atm because the params are transformed along with the object; they'd better stay untransformed,
and a local
offset transform be stored in each object the effect is
applied to...)
See https://bugs.launchpad.net/inkscape/+bug/304450/comments/3. What I forgot in that discussion is the possibility of always storing the transform matrix in a path with an LPE (it's just a pref setting atm). If people want that, then turn off/on the preference and you're done I think. (prefs -> transforms -> store transf.: preserved)
Sharing of LPEs is possible, but awkward like it is for gradients. I think we should add a preference to always fork LPEs, like there is for gradients.
If one would want sharing of LPE parameters, a much better option would be to implement something where the value of an LPE parameter can be defined to point to something global. I.e., have the knot spacing defined as "kspacing" in the LPE, which points to a global variable in the SVG that is called "kspacing". Something like this:
<defs> <variables> kspacing = "1.2" <\variables> <lpe123> effect = "knot" spacing = "->kspacing" (instead of spacing="1.2") <lpe123> <lpe456> effect = "knot" spacing = "->kspacing" (instead of spacing="1.2") <lpe456> </defs> <path> d = "..." lpe = #lpe123 <\path> <path> d = "..." lpe = #lpe456 <\path>
Then, it is clear to the user that an effect has a shared parameter (because the widget shows the name "kspacing"), and it is easy to check to see whether all applied knots have that same parameter. And probably there are knots in the document that people do *not* want to have shared.
Also think of possible complexities with LPE stacks and LPE on groups...
Bulia wrote:
I think something like that was planned from the beginning. For example, a true variable width stroke - not just triangle- or ellipse-shaped - would have to store its own set of distance/width pairs, unique for each path.
I don't understand what Bulia means. True variable width stroke is already possible. What has not been implemented yet is using a directional pen for stroking and certain pen tip shapes, but JF and I are working on it. It is unimportant for the "transformation propagation" that LPE does now.
Cheers, Johan