If "width in units of legnth" is off (default), then scaling a path
with a pattern leaves the width constant, thus changing the shape of
the result. This is sometimes desired and sometimes not. I propose
that the "Affect stroke" button on the selector toolbar must affect
this as well, so that I could scale or not scale pattern width at
will. (Or maybe add another button there: Affect Path Effect, separate
from the stroke.)
Here's what needs to be done. In sp_path_set_transform, there's a call
to sp_item_adjust_stroke which scales the stroke of the transformed
path. You need to add a generic scale method to the LPE object and a
function that would call it for the given item if the item is a path
using LPE. Each kind of LPE will "scale" itself in different ways; for
path-on-path, it is scaling the pattern width, for a rounding-corners
effect it is scaling the radius of the roundings, etc.
So, in the call from sp_path_set_transform, you just scale the LPE
proportionally and unconditionally. For path-on-path, depending on the
"width in units of legnth" switch, it will either do nothing (if it's
on) or scale the width by the given expansion (if it's off). Then, the
same function is also called from sp_item_write_transform, where it
looks up the user preference first. This means that the "do not scale"
mode is done a little wastefully: it is first scaled up in
sp_path_set_transform and then back down in sp_item_write_transform.
But that's the way it's done for stroke scale, and I think you just
need to repeat all this for LPEs as well.
I think that the main issue behind this is that transforming an object before or after applying an lpe is not the same.
Therefore, I think the natural answer is to use effect stacking.
A basic "transform effect" should be defined, and whenever you rescale, rotate or transform an object carying such an lpe effet, the transform is added as a new transform effect at the end of the stack (or merged with the last one if it is already a transform effect) rather than as a transform attribute.
The result is then wat you visually expect. The benefit of this solution is that it is uniform for all lpe, and handles the case of several effects: propagating the transforms into all the parameters of all the effects might be tricky.
In the particular exemple of skeletal stroke, you can along-path. along-path.
-scale the skeleton without scaling the pattern by inserting a transform effect *before* lpe-pattern-
-scale both skeleton and pattern by inserting a transform effect *after* the lpe-pattern-
Of course, this requires to have a user friendly lpe stack, but I think we'll sooner or later need one!!
-JFB.
-JF.