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

Rik Cabanier cabanier at gmail.com
Sun Dec 16 20:52:33 PST 2012


On Wed, Dec 12, 2012 at 10:24 AM, Justin Novosad <junov at chromium.org> wrote:

>
>
> On Wed, Dec 12, 2012 at 12:39 PM, Rik Cabanier <cabanier at gmail.com> wrote:
>
>>
>> What would be the next step? Should we define a new version of drawImage
>> with the extra parameter?
>
>
> That is one option, but I think a context attribute (like
> imageSmoothingEnabled) is also worth considering.
> Perhaps image smoothing could be an enum rather than boolean with an
> additional mode that prevents color bleeding.
>

It seems a bit too expensive to add a variable to the graphics context that
is checked for just this call.
Maybe just a new drawImage call (like drawNonSmoothedImage?) is all that is
needed.


>
>
>> If so, we probably want the description of the existing drawImage call to
>> change so it leaves the resampling issue undefined unless WebKit is OK with
>> changing their current behavior.
>>
>
> IMHO: Undifined behavior is a spec bug. If we have a problem with the
> spec, we fix the spec, we don't just each do our own thing.
>
>



More information about the whatwg mailing list