We have multiple discussions on IRC about dependent shapes system in Krita. I feel really uncomfortable discussing that basing on a mere SVG standard, without real-world applications to that. So I decided to start a list of requirements that we want to fulfill by implementing such dependencies.
Requirements
==========
1) Text on path feature
1) The user should be able to edit the path using the standard shape-editing tool
2) The user should be able to edit custom handles provided by the text shape itself:
* anchors
* offset from the curve
* [TODO] what else
2) Text in shape feature
1) The user should be able to __resize__ the parent shape. When resizing happens, the internal text shape undergoes a relayout
2) The user should be able to __transform__ the parent shape. In this case the internal text of the shape is **not relayouted**, but just scaled/transformed (like all the shape decorations, like stroke/pattern).
3) The user should be able to edit custom handles provided by the text shape itself:
* anchors
* offset from the sides of the shape
* [TODO] what else
3) SVG2 specification supports "referenced objects" feature, which behaves effectively like "cloned" shapes.
* [TODO] Do we actually want to support this feature on-the-fly? Will painters have enough usefulness in it? Right now our policy is bake/detach all the lazy links on loading.
4) "Enter group" feature
1) The user should be able to edit the shapes inside a group without ungrouping them
1) Select "Enter group" mode
2) All shapes except of the ones belonging to a group are grayed-out
3) The user can select and edit shapes inside the group
4) Clicking on any (grayed-out) shape outside the group exits the "enter group" mode.
Questions to answer
================
1) Are there any other usecases of dependent shapes framework?
2) Should we support SVG2's "referenced object" feature? Personally, I believe that we shouldn't (and, afair, DOM-model doesn't actually keep runtime links for such objects, it detaches all references on loading, as per specification; though my info might be outdated)