Re: [svgwg] consider more involved path shapes (#754)

I'd say that if your use of SVG is strictly as an export format for static images (that is, neither for editing, or animating, or allowing user interactivity), then I agree that adding topological semantics isn't that useful, and in fact that the proposition of @Doktorchen seems good enough. However, in this case, there isn't either any need for more involved path shapes at all. Any shape can be accurately depicted using filled paths.

The reason for stroked paths, and other high-level primitives like rect, circle, etc., is three-folds:
1. To make them easier to author by hand.
2. To add more semantics which is useful for editing / animating / enabling user interactivity.
3. To potentially save on file size.

Adding n-way joins and shared edges à-la Figma or VGC is definitely a huge step forwards in all these three points, and you seem to be potentially interested by the first point :-)

---

Regarding "proper stroke linejoin", I agree that for static images, and if all your incident edges have the same width and the same color, you can simply have the two "exterior" edges be one joined path as a workaround:

![image](https://user-images.githubusercontent.com/4809739/69483396-34c41300-0e27-11ea-88f8-cef24c3a674f.png)

However, it doesn't work if you have different colors and/or widths:

![image](https://user-images.githubusercontent.com/4809739/69483430-b7e56900-0e27-11ea-8dd9-b2f32edecc38.png)

Or if you have semi-transparent edges:

![image](https://user-images.githubusercontent.com/4809739/69483489-3215ed80-0e28-11ea-9ac1-2967d581aa18.png)


And obviously it doesn't work if you animate/edit which of the two edges are the "exterior" ones (note that the three edges do share the same exact end position):

![image](https://user-images.githubusercontent.com/4809739/69483533-ac467200-0e28-11ea-81da-f1e3b2e5ef40.png)

All of these could be elegantly solved if the spec allowed paths to share endpoints, and add explicit rules on how they should be rendered (which is a hard problem, I have to admit). I have this figure in my PhD thesis:

![image](https://user-images.githubusercontent.com/4809739/69483651-36dba100-0e2a-11ea-86cd-f285c6fa9120.png)


---

Anyway, the real power and motivation behind adding topological information is indeed not to be able to represent n-way line joins, but to be able to represent shared path-data between different paths. It does solve all the problems you are presenting here, and more. I forgot to mention another attempt at standardizing this type of things into SVG: superpaths

https://hal.archives-ouvertes.fr/hal-01793944/file/SuperPathSVGOpen.pdf
https://github.com/moissinac/SuperPath


-- 
GitHub Notification of comment by dalboris
Please view or discuss this issue at https://github.com/w3c/svgwg/issues/754#issuecomment-557823137 using your GitHub account

Received on Saturday, 23 November 2019 18:49:51 UTC