Fix regressions in "Pattern along path" and "Scatter" extensions
With these extensions first the porting to 1.0 was messed up and then they have been sorely neglected. So there's a bunch of issues addressed here.
I restored the extensions to behave generally as in 0.92.4. and as described on this page. The examples for Pattern along path have been added as unit tests.
- Closes #368 (closed)
- Closes #295 (closed) incl. unit test
- Closes #294 (closed)
- Closes #231 (closed) (* sample file works after converting circle to path)
- Closes #314 (closed) (likely cause for symptom: translate on the skeleton group)
- Closes #308 (closed)
- Closes #293 (closed) (the pattern is now the topmost object)
- Closes #140 (closed)
- Closes #124 (closed)
- Closes #241 (closed) (added this file as a unit test, since unlink_clone had wrong transform order)
- Closes inbox#3044 (closed) (all test cases working), it's a nice systematic test, but nothing which isn't dovered by the existing unit tests
- sort of closes https://bugs.launchpad.net/inkscape/+bug/1660702 (added a hint to the help tag explaining this behavior)
*: Due to #367 (closed), the bounding box computation is broken which affects this extension as well. As a workaround, convert circles/rects to paths first.
I have also fixed a few things in inkex.
- Clone unlinking had a wrong transform order (related to #301)
- Same problem in PathModifier.expand_groups
- The
paint_order()function used naive string comparison on xpaths for sorting instead of natural sort, so"/*/*[4]/*[16]" < "/*/*[4]/*[9]"
These were of course all covered by unit tests, but neither ran into the problem (e.g. one transform was always identity, so order doesn't matter; no unit test selected such a combination of objects). The new unit tests for the two extensions now cover these cases as well.
Apart from that, cleaned up the code and moved quite a bit to the parent class, added some comments and improved the help tag.