PathElement.apply_transform() does not change "d" ?
Steps to reproduce:
$ PYTHONPATH=/usr/share/inkscape/extensions python
Python 3.8.2 (default, Apr 8 2020, 14:31:25)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import inkex
>>> node = inkex.elements.PathElement(d="M 0 0 L 1 0 Z", transform="scale(10)")
>>> node.get('d')
'M 0 0 L 1 0 Z'
>>> node.path
[Move(0, 0), Line(1, 0), ZoneClose()]
>>> node.transform
Transform(((10, 0, 0), (0, 10, 0)))
>>> node.apply_transform()
>>> node.get('d')
'M 0 0 L 1 0 Z'
>>> node.path
[Move(0, 0), Line(1, 0), ZoneClose()]
>>> node.transform
Transform(((1, 0, 0), (0, 1, 0)))
Transform has been reset but "d" has not changed.
Solution:
inkex/elements/_polygons.py:47 PathElementBase.apply_transform
<< self.path.transform(self.transform)
>> self.path.transform(self.transform, inplace=True)
Probably need "inplace=True" ?
Inkscape Version and Operating System:
- Inkscape 1.0 (4035a4fb49, 2020-05-01)
- ArchLinux