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

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

From: Ian Hickson <ian@hixie.ch>
Date: Mon, 8 Aug 2011 20:58:03 +0000 (UTC)
Message-ID: <Pine.LNX.4.64.1108082057340.14637@ps20323.dreamhostps.com>
On Mon, 8 Aug 2011, Justin Novosad wrote:
> 
> This inquiry is regarding this page of the specification: 
> http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html 
> In section 4.8.11.1.10 Images, about drawImage(), it is stated that "If 
> one of the sw or sh arguments is zero, the implementation must raise an 
> INDEX_SIZE_ERR exception"  There are no other references to other 
> circumstances under which INDEX_SIZE_ERR should be thrown, and there is 
> no indication of what the correct behavior is when the source rectangle 
> is completely or partially outside the bounds of the source image.

A bit lower down in the same section, the spec says: "When the filtering 
algorithm requires a pixel value from outside the original image data, it 
must instead use the value from the nearest edge pixel. (That is, the 
filter uses 'clamp-to-edge' behavior.)"

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Monday, 8 August 2011 13:58:03 UTC

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