W3C home > Mailing lists > Public > public-fx@w3.org > January to March 2016

Re: [strokes] CSS fill/stroke spec + questions

From: Nikos Andronikos <Nikos.Andronikos@cisra.canon.com.au>
Date: Thu, 11 Feb 2016 21:35:56 +0000
To: Tab Atkins Jr. <jackalmage@gmail.com>
CC: Tavmjong Bah <tav.w3c@gmail.com>, www-svg <www-svg@w3.org>, "public-fx@w3.org" <public-fx@w3.org>
Message-ID: <AA4D4FCC-D67C-4CFB-AD50-AB8AE97A5E6D@cisra.canon.com.au>
<snip>

> On 10 Feb 2016, at 11:37 AM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
>
> On Fri, Jan 29, 2016 at 6:07 AM, Tavmjong Bah <tav.w3c@gmail.com> wrote:
>>
>>  Interesting, the SVG spec does say "The ‘pathLength’ attribute on a
>> ‘path’ element affects ‘stroke-dasharray’: each dash and gap length is
>> interpreted relative to the author's path length as specified by
>> ‘pathLength’." What this actually means, I don't know... but it would
>> be quite handy to have percentages defined relative to path length (but
>> probably not very useful for stroking text).
>>
>> stroke-dashoffset:
>>
>>  Same comments as for 'stroke-dasharray'.
>
> ...oh jeez, I see the issue.  The spec is wrong/contradictory!  For
> both dasharray and dashoffset, it claims that % is relative to the
> scaled diagonal, but it's *actually* relative to the pathLength, which
> is obviously completely different!  That's why the "self-drawing SVG"
> thing works - you create a 100% dash and a 100% gap, then animate
> dashoffset from -100% to 0%.
>
> Having the % be relative to the path length is more reasonable.  I'll
> fix our spec.  I'll let you fix SVG. ^_^
>
> ~TJ

SVG 2 fixes this already I believe.

"Specifies a dashing pattern to use. A <dasharray> is a list of comma and/or white space separated lengths or percentages. Each value specifies a length along the path for which the stroke is to be painted (a dash) and not painted (a gap).

https://svgwg.org/svg2-draft/painting.html#StrokeDashing


Nikos.



The information contained in this email message and any attachments may be confidential and may also be the subject to legal professional privilege. If you are not the intended recipient, any use, interference with, disclosure or copying of this material is unauthorised and prohibited. If you have received this email in error, please immediately advise the sender by return email and delete the information from your system.
Received on Thursday, 11 February 2016 21:36:46 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 11 February 2016 21:36:47 UTC