Re: Initial comments on SVG Strokes, 2015-04-09

Regarding inside/outside on open paths [1]:

What if we
(a) introduce "left" and "right" values (which are used in the figure as an
"alternative value" but not currently listed in the text)
(b) declare that on an open path (or sub-path), a value of "outside" would
always be interpretted as "left", while "inside" would always be
interpretted as "right"?

Quite frankly, the alternative of having disjoint strokes at every
inflection point doesn't seem to be a practical use case.

The left=outside / right=inside pairing is consistent with other parts of
the spec that rely on defining sides of a path relative to the path drawing
direction, such as textPath and motion-path.  For example, if you used a
stroke-alignment of "inside" on a path that was also used as a textPath,
the text would always be on one side of the line and the stroke would be on
the other, regardless of how the path curved or whether or not it was
closed.

It would also be consistent with the new path definitions for basic shapes,
which are always clockwise, and conventions in other vector graphics
standards that define clockwise paths as containing content,
counter-clockwise as excluding content.

However, it would also allow people to safely use "inside" and "outside" on
*closed* paths, without having to worry about winding order!  In that case,
the stroke alignment would depend on the actual filled region.

However, we would still have to clearly define what happens when a stroke
passes through the middle of a closed shape with `fill-rule: nonzero`,
where both sides of the stroke could be "inside" (in that they overlap a
filled region).   Possible options:

* Don't stroke these internal edges at all if `stroke-alignment` is
"outside", double the stroke if alignment is "inside".
* Don't stroke these internal edges at all if `stroke-alignment` is
"outside", center the stroke if alignment is "inside".
* Center the stroke on an internal edge for either "outside" or "inside".

[1]: http://www.w3.org/TR/2015/WD-svg-strokes-20150409/#issue5

Received on Thursday, 16 April 2015 14:46:14 UTC