W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2011

[whatwg] Need clarification on DOM exceptions thrown by canvas 2D drawImage

From: Justin Novosad <junov@chromium.org>
Date: Tue, 9 Aug 2011 11:29:34 -0400
Message-ID: <CABpaAqRoZcmDGmYeRU-xaLzh_1c3RJwrev4rTSxOjCGKCGQN8w@mail.gmail.com>
Thanks Philip, that really cleared things up for me.

Any chance you might adjust the 2d.drawImage.outsidesource.html test
to reflect this change in the spec?

> because of the filtering requirements. If CoreGraphics can't do that
> then it's broken (per the spec) regardless of how source rectangles
> are handled. Or is it able to do clamp-to-edge fine up to the edge of
> the source image, just not extend that beyond the image when the
> source rectangle is expanded further?

I second that. And in support of the spec, let me just say that the
clamp-to-edge is essential for many existing canvas-based games that
use large images as sprite maps.  Without clamping to the edge of the
source rectangle you would get color bleeding between adjacent sprites
when the draw operation magnifies the sprite, or even just when it is
not perfectly pixel-aligned.

Received on Tuesday, 9 August 2011 08:29:34 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:35 UTC