W3C home > Mailing lists > Public > public-html@w3.org > February 2011

Re: An inherent flaw in <canvas>?

From: Maciej Stachowiak <mjs@apple.com>
Date: Mon, 31 Jan 2011 16:52:46 -0800
Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, Justin Anthony Knapp <justinkoavf@gmail.com>, public-html@w3.org
Message-id: <8520D650-04C1-4ADB-A807-5D0DE4C7F570@apple.com>
To: Aryeh Gregor <Simetrical+w3c@gmail.com>

On Jan 31, 2011, at 4:45 PM, Aryeh Gregor wrote:

> On Mon, Jan 31, 2011 at 1:50 PM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
>> No.  It's a fundamental restriction of an immediate-mode,
>> one-shape-at-a-time API that this sort of thing will happen,
>> especially if anti-aliasing is involved.
> 
> The Flash version of the program looks like it's using an
> immediate-mode, one-shape-at-a-time API:
> 
> https://github.com/petewarden/stitchingbug/blob/master/FlashVersion/src/StitchingTest.mxml
> 
> But it apparently doesn't exhibit the problem.  Surely there's some
> trick you could use to avoid the problem a lot of the time in
> practice.

It would be interesting to know Flash avoids the issue.

One approach that I know will work (better than "retained mode + magic") is to turn off antialiasing. Maybe canvas should have an API for that, since sometimes crisp edges are more important than smoothness. It does not look like Flash turns off AA though.

Regards,
Maciej
Received on Tuesday, 1 February 2011 00:53:21 UTC

This archive was generated by hypermail 2.3.1 : Monday, 29 September 2014 09:39:22 UTC