Re: [whatwg] Stroking algorithm in Canvas 2d

On Thu, Oct 10, 2013 at 5:48 PM, Ian Hickson <ian@hixie.ch> wrote:

> On Thu, 10 Oct 2013, Rik Cabanier wrote:
> >
> > setLineDash([30]);
> > rect(10, 10, 100, 100);
> > rect(10, 110, 100, 100);
> > rect(10, 210, 100, 100);
> > stroke();
> >
> > These rectangles should look the same.
>
> I presume you mean "I want those rectangles to look the same". I don't see
> any a priori objective reason why they should look the same.
>

And is there an a priori objective reason why they should look different?
It seem pretty obvious to me that there would be way more designers wanting
the rects to look the same than there would be wanting the rects to look
different.


>
> You could get that effect easily with my proposal:
>
>  setLineDash([30]);
>  beginPath();
>  rect(10, 10, 100, 100);
>  stroke();
>  beginPath();
>  rect(10, 110, 100, 100);
>  stroke();
>  beginPath();
>  rect(10, 210, 100, 100);
>  stroke();
>
>
Yes, but should we not provide the most desirable behavior by default?

Received on Thursday, 10 October 2013 22:09:47 UTC