W3C home > Mailing lists > Public > www-svg@w3.org > November 2011

Re: Clarification on SVG stroke implementation

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 22 Nov 2011 14:45:08 -0800
Message-ID: <CAAWBYDBonUZDzVXOa1SB=637=6ZAhRzhAohD-TxsAHgzYMufgQ@mail.gmail.com>
To: Stephen Chenney <schenney@google.com>
Cc: www-svg@w3.org
On Tue, Nov 22, 2011 at 2:37 PM, Stephen Chenney <schenney@google.com> wrote:
> Thanks for the reply.
> No problem on the linecaps issue.
> I am confused by the marker discussion. I would expect "m 10 10 m 20 20" to
> draw two markers, one at (10, 10) and one at (20, 20) because there are no
> endpoints at all, just a lone point. And I expect "m 10 10 z m 20 20 z" to
> draw four markers, because there are two lines of zero length, each with a
> start- and end-point.

There's no such thing as a "lone point" here, only zero-length
segments.  In "m 10 10 m 20 20", there are two such segments.
Segments always have a start and end, so both start and end markers
can show up on each.

> And now another question in the same vein. The Implementation Notes for arcs
> says the following:
> "If the endpoints (x1, y1) and (x2, y2) are identical, then this is
> equivalent to omitting the elliptical arc segment entirely. ... Continuous
> animations that cause parameters to pass through invalid values are not a
> problem. The motion remains continuous."
> This does not seem consistent to me. If you have an animated arc with
> non-butt linecaps drawn, and the animation causes the endpoint of the arc to
> match the start point, I would expect to see the equivalent of a zero-length
> path. Under the current implementation note, for a frame (or more) while the
> animation passes through zero length the linecaps will flash out of
> existence. That's not continuous. I believe that a better implementation
> note would be "If the endpoints (x1, y1) and (x2, y2) are identical, then
> this is equivalent to a zero-length line (a lineto) from one endpoint to the
> other."

Yes, that line appears inconsistent with the definitions elsewhere,
and produces an unstable display.  Your suggested change sounds good
to me.

~TJ
Received on Tuesday, 22 November 2011 22:46:00 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:49 GMT