W3C home > Mailing lists > Public > whatwg@whatwg.org > October 2013

Re: [whatwg] Stroking algorithm in Canvas 2d

From: Justin Novosad <junov@google.com>
Date: Thu, 10 Oct 2013 18:09:21 -0400
Message-ID: <CABpaAqTPBDNhXOSeMNWeajkQ8312sHgP-5zrstDPwTy4UALS=A@mail.gmail.com>
To: Ian Hickson <ian@hixie.ch>
Cc: "Jasper St. Pierre" <jstpierre@mecheye.net>, "whatwg@whatwg.org" <whatwg@whatwg.org>, Rik Cabanier <cabanier@gmail.com>, syhann@adobe.com
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

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:11 UTC