https://bugs.kde.org/show_bug.cgi?id=508361

            Bug ID: 508361
           Summary: `toSvg` ignores text transforms
    Classification: Applications
           Product: krita
      Version First 5.2.9
       Reported In:
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: Scripting
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

***
If you're not sure this is actually a bug, instead post about it at
https://discuss.kde.org

If you're reporting a crash, attach a backtrace with debug symbols; see
https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports

Please remove this comment after reading and before submitting - thanks!
***

SUMMARY

[toSvg](https://api.kde.org/krita/html/classShape.html#aa9cc7dbe137e7edb123f0611f6fd9555)
ignores transforms that have been applied to text objects.

STEPS TO REPRODUCE
1. Insert some text on a new layer
2. Open the scripter and run:

```python
import krita
k=krita.Krita.instance()
d=k.activeDocument()
n=d.activeNode()
print(n.shapes()[0].toSvg())
```

OBSERVED RESULT

There is no `transform=` on the text.

EXPECTED RESULT

There is a `transform=` attribute, and the coordinates and transforms of the
text is lost. If you retry this experiment with a rectangle, a transform
attribute is included.

This is especially noticeable in groups: it is currently impossible to
losslessly convert a group to/from SVG (via `toSvg` and `addShapesFromSvg`),
because all the text ends up bunched up in the top left of the group.

SOFTWARE/OS VERSIONS

Qt Version: 5.15.11

ADDITIONAL INFORMATION

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to