RE: [SVG12] Issues regarding stroke-dasharray

Rick,
I noticed a problem with my response. I said:

-------------------
Thus, for a
circle it starts at (cx+r,0) and then to sweeps through (cx,cy+r). 
-------------------

I should have said: 

-------------------
Thus, for a
circle it starts at (cx+r,cy) and then to sweeps through (cx,cy+r). 
-------------------

Jon


-----Original Message-----
From: www-svg-request@w3.org [mailto:www-svg-request@w3.org] On Behalf
Of Jon Ferraiolo
Sent: Sunday, March 05, 2006 1:59 PM
To: Rick
Cc: www-svg@w3.org
Subject: Re: [SVG12] Issues regarding stroke-dasharray


Hi Rick,
This is the official SVG WG response to your email at:
  http://lists.w3.org/Archives/Public/www-svg/2006Jan/0354.html

We agree with your comment. We have changed the language in the
description for rect, line, polyline and polygon to clarify that those
shapes must be rendered the same as the equivalent path object. [We did
not explicitly mention stroking because we don't think it is necessary
with the wording change and we would then also have to mention other
things (e.g., markers, vector effects) for Full.] We have added
statements to circle and ellipse that describe the starting point for
the stroke and how the stroke proceeds around the shape. The start point
is indeed "3 o'clock" as you suggest. It proceeds in a positive sweep
angle direction using SVG's flipped coordinate system. Thus, for a
circle it starts at (cx+r,0) and then to sweeps through (cx,cy+r).

BTW - we checked some existing implementations. Every different
implementation that we checked uses a different approach for stroking
circles and ellipses. Not a big deal in most scenarios, but as you
probably know, some parts of the engineering world want exactness. Thus,
we greatly appreciate your comment.

Please tell us within two weeks if this response is not satisfactory.

Jon Ferraiolo
SVG WG

----------------------

From: Rick <graham.rick@gmail.com> 
Date: Sun, 22 Jan 2006 23:03:11 -0500
Message-ID:
<18569e000601222003j449e0a58jced11ffc799bc993@mail.gmail.com> 
To: www-svg@w3.org 

Dear SVG working group,

Thank you for your hard work in resolving issues on this CR.

This is an issue that I've been aware of this for quite some time, but
had forgotten.  Please forgive me for leaving it to this late date to
bring it up.

Dash arrays can have a dramatic effect on the look of an image,
particularly if they are large.  I'm currently working on a technical
proposal that involves the use of SVG and have some compatibility
problems between major viewers over this feature.

The description of dasharray
http://www.w3.org/TR/SVG/painting.html#StrokeProperties does not
specify in what manner the effect should be applied.  This is
particularly esoteric with closed shapes such as rect or circle
because they have no intrinsic starting point or direction.  The spec
does outline how these objects are to be described, but it does not
specify that dashed lines must follow these rules.  There are
inconsistencies in current implementations in this respect that
produce drastically different results for some markup.

I would suggest appending wording similar to the following to the
description of dasharray to assist implementers with this feature:

 ---
The dash sequence must start at the beginning of a shapes data and
follow the stroke description through to the end of the shape.  For
shapes that do not have obvious starting points, the method for
rendering them is specified in the basic shapes section of this
specification.  <link>
  ---

Please revise the specification to clarify this.

Further to this issue, I believe that the methods for describing of
circles and ellipses needs further clarification.

http://www.w3.org/TR/SVG/shapes.html#CircleElement states:

 ---
The arc of a 'circle'  element begins at the "3 o'clock" point on the
radius and progresses towards the "9 o'clock" point. The starting
point and direction of the arc are affected by the user space
transform in the same manner as the geometry of the element.
 ---

It is unclear whether, unaffected by any transformation, that the
direction of these shapes should be clockwise or counterclockwise.  3
o'clock and 9 o'clock are 180 degrees from each other.

I would suggest changing the wording so that 9 o'clock be changed to
either 12 o'clock or 6 o'clock, or that a CW or CCW direction be
specified.

Please revise the descriptions of the circle and ellipse elements to
clarify this.

--
Cheers!
Rick

Received on Monday, 6 March 2006 13:22:50 UTC