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

Justin Novosad junov at chromium.org
Mon Dec 10 13:18:36 PST 2012

On Mon, Dec 10, 2012 at 4:04 PM, Rik Cabanier <cabanier at 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?

More information about the whatwg mailing list