Re: [svgwg] Rect decomposition is invalid (#753)

>  especially since SVG has a "version" attribute

The version attribute was removed from SVG 2. Major user agents (including all the browsers) did not want to maintain separate rendering rules for different versions of SVG. Any changed behavior in SVG 2 must be justified either as an obvious bug fix, clarification of inconsistent behavior between major user agents, or a removal of a rarely used, unimplemented, or poorly implemented feature.

I don't think it's too much of a tweak to say that the equivalent paths for rect, ellipse, and circle have a zero-length Z segment at the end (and therefore can be neatly marked up just with `marker-mid`). In addition to being convenient for markers, this has a secondary benefit in that we can define the equivalent paths for shapes with curves without requiring the unimplemented segment-completing Z syntax.

It does mean that for an author to get equivalent behavior with a polygon or straight-line path, they would need to explicitly repeat the start coordinate before closing. But that's what authors currently have to do with curved paths, anyway.

@Tavmjong, does Inkscape expose the equivalent paths as currently defined in any way? Does it support markers on circle, rect, and ellipse? I'm pretty sure the answer is no for all the web browsers, so there's no compat issue there (haven't tested [markers on basic shapes](https://codepen.io/AmeliaBR/collab/84fe895e02dea7ae63d7ede7ae5208c6) in Safari).

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

Received on Monday, 2 December 2019 18:58:19 UTC