W3C home > Mailing lists > Public > whatwg@whatwg.org > December 2012

Re: [whatwg] I believe source rectangles for HTML5 Canvas drawImage are specified incorrectly

From: Justin Novosad <junov@chromium.org>
Date: Mon, 10 Dec 2012 16:18:36 -0500
Message-ID: <CABpaAqS919oinhCjkVH+wxBZjER3pgP0mMHvFCxdRTmQTJ3uzg@mail.gmail.com>
To: Rik Cabanier <cabanier@gmail.com>
Cc: whatwg@lists.whatwg.org, Jeff Muizelaar <jmuizelaar@mozilla.com>, Vladimir Vukicevic <vladimir@pobox.com>, Ian Hickson <ian@hixie.ch>, Kevin Gadd <kevin.gadd@gmail.com>
On Mon, Dec 10, 2012 at 4:04 PM, Rik Cabanier <cabanier@gmail.com> wrote:

>
>
> As Ian said, copying the sprite image to a non-scaled canvas first (which
> most games probably do anyway) works around the issue.
> There is no need for padding in that case.
>
>
Yes, I am sure a lot of games do it already to work around the color
bleeding problem but there is a performance cost to doing that.

Couldn't we just make everyone happy by making the behavior controllable
through a context attribute or an additional overload of drawImage that
takes an extra argument?
Received on Monday, 10 December 2012 21:19:03 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:09:18 UTC