[whatwg] Dashed strokes on <canvas>

Ian Hickson ian at hixie.ch
Wed May 16 21:29:14 PDT 2007


On Wed, 16 May 2007, ddailey wrote:
> 
> 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

Except the former one doesn't look anything as good as the latter one, 
almost exclusively because of the difference in the dashes. :-) (The 
<canvas> one has rounded caps on the "dashes", and they are smaller for 
the minute marks than the 5 minute marks.)


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

Cool, thanks for the pointers.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'



More information about the whatwg mailing list