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

On Thu, 2015-04-16 at 08:45 -0600, Amelia Bellamy-Royds 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"?

Seems reasonable.

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

Agreed.

> 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.

I've recently added 'side' with values 'left' and 'right' to 'textPath'
to allow specifying the side text is put for closed paths.[2]

> 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".

I think the best option is to not stroke the internal edges for either
'inside' or 'outside' if the fill-rule is 'nonzero.

I just added an issue and figure to SVG Strokes.[3]

Tav

> [1]: http://www.w3.org/TR/2015/WD-svg-strokes-20150409/#issue5
[2] https://svgwg.org/svg2-draft/text.html#TextPathAttributes
[3] https://svgwg.org/specs/strokes/#issue6

Received on Friday, 17 April 2015 12:31:06 UTC