[whatwg] Stroking algorithm in Canvas 2d
Justin Novosad
junov at google.com
Thu Oct 10 15:09:21 PDT 2013
On Thu, Oct 10, 2013 at 5:48 PM, Ian Hickson <ian at 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?
More information about the whatwg
mailing list