[whatwg] Dashed strokes on <canvas>

> It's not that there's no plan. It's just that the plan is more along the
> lines of "we'll wait and maybe add it later" rather than "we'll add it
> now", since there are workarounds and seemingly little demand.
>
> Please let us know if you get any input on your blog post.
>
The utility of dashed strokes is something I can get interested in.

Observe the sparseness of the JavaScript code involved in
http://srufaculty.sru.edu/david.dailey/svg/clock.svg (working in IE, FF & 
Opera)

compared to the <canvas> solution someone posted the other day here.
http://developer-stage.mozilla.org/en/docs/Canvas_tutorial:Basic_animations

(about 1/4 as much code all told) and much of that is attributable to dashed 
strokes.

I know it's comparing apples to oranges, but it may provide a bit of 
incentive.

In terms of a not so practical use case 
http://srufaculty.sru.edu/david.dailey/svg/newstuff/wiggleline.svg
as viewed in Opera provides a very good reason, though IE/ASV does not 
properly animate dashed strokes and FF doesn't do SMIL yet so you'll need 
Opera to see it.

A ten or twelve year old java applet doing something similar can be seen 
here:
http://srufaculty.sru.edu/david.dailey/java/tile/Trime.html In it the 
dashing is provided rather painfully through code.

cheers,
David

Received on Wednesday, 16 May 2007 20:35:13 UTC