WIP: [INVALID] Use shape-to-text transform with `shape-inside`
For text with shape-inside layout ("Flow into Frame"), use shape->getRelativeTransform(text) instead of simply shape->transform when applying the curve. This means that text will flow exactly into the curve that's visible on screen, independent of groups and parent transformations.
Marking as WIP because I'm not sure if this complies with the SVG spec. I can't find any details about handling of shape transforms in the SVG 2 spec. Since this is a new SVG feature, there are also no reference implementations. In my opinion, considering the full item-to-item transform should be the correct thing to do.
Somewhat related: SVG 1.1 textPath does not consider parent transforms, unfortunately.
The path data coordinates within the referenced ‘path’ element are assumed to be in the same coordinate system as the current ‘text’ element, not in the coordinate system where the ‘path’ element is defined.
There is no such statement for shape-inside in the SVG 2 spec.
@Tavmjong please advice.
| Current | Proposed |
|---|---|
| shape-inside-current-2020-04-30_09.05.02 | shape-inside-expected2-2020-04-30_09.08.42 |