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

I agree that stroke-alignment and similar effects should be defined in
terms of path direction.  Having strokes automatically switch sides based
on path curvature doesn't seem at all useful or predictable to me either.

> 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`,

If it is based only on path direction as you suggest, I don't see why its
position with respect to other parts of the path would cause any effect.
It would continue to be on the same side as it was previously.  Perhaps I
am not understanding your example?

Paul


On 17 April 2015 at 02:45, Amelia Bellamy-Royds <
amelia.bellamy.royds@gmail.com> wrote:

> 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 18:20:59 UTC