[html5] r7177 - [giow] (2) Admit defeat: putImageData() assumes 96dpi. We'll add HD versions of [...]

whatwg at whatwg.org whatwg at whatwg.org
Mon Jul 16 12:16:27 PDT 2012


Author: ianh
Date: 2012-07-16 12:16:26 -0700 (Mon, 16 Jul 2012)
New Revision: 7177

Modified:
   complete.html
   index
   source
Log:
[giow] (2) Admit defeat: putImageData() assumes 96dpi. We'll add HD versions of these methods shortly.
Affected topics: Canvas

Modified: complete.html
===================================================================
--- complete.html	2012-07-12 19:25:06 UTC (rev 7176)
+++ complete.html	2012-07-16 19:16:26 UTC (rev 7177)
@@ -240,7 +240,7 @@
 
   <header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
    <hgroup><h1 class=allcaps>HTML</h1>
-    <h2 class="no-num no-toc">Living Standard — Last Updated 12 July 2012</h2>
+    <h2 class="no-num no-toc">Living Standard — Last Updated 16 July 2012</h2>
    </hgroup><dl><dt><strong>Web developer edition:</strong></dt>
     <dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
     <dt>Multiple-page version:</dt>
@@ -35812,11 +35812,11 @@
   void <a href=#dom-context-2d-addhitregion title=dom-context-2d-addHitRegion>addHitRegion</a>(<a href=#hitregionoptions>HitRegionOptions</a> options);
 
   // pixel manipulation
-  <a href=#imagedata>ImageData</a> <a href=#dom-context-2d-createimagedata title=dom-context-2d-createImageData>createImageData</a>(unrestricted double sw, unrestricted double sh);
+  <a href=#imagedata>ImageData</a> <a href=#dom-context-2d-createimagedata title=dom-context-2d-createImageData>createImageData</a>(double sw, double sh);
   <a href=#imagedata>ImageData</a> <a href=#dom-context-2d-createimagedata title=dom-context-2d-createImageData>createImageData</a>(<a href=#imagedata>ImageData</a> imagedata);
-  <a href=#imagedata>ImageData</a> <a href=#dom-context-2d-getimagedata title=dom-context-2d-getImageData>getImageData</a>(unrestricted double sx, unrestricted double sy, unrestricted double sw, unrestricted double sh);
-  void <a href=#dom-context-2d-putimagedata title=dom-context-2d-putImageData>putImageData</a>(<a href=#imagedata>ImageData</a> imagedata, unrestricted double dx, unrestricted double dy);
-  void <a href=#dom-context-2d-putimagedata title=dom-context-2d-putImageData>putImageData</a>(<a href=#imagedata>ImageData</a> imagedata, unrestricted double dx, unrestricted double dy, unrestricted double dirtyX, unrestricted double dirtyY, unrestricted double dirtyWidth, unrestricted double dirtyHeight);
+  <a href=#imagedata>ImageData</a> <a href=#dom-context-2d-getimagedata title=dom-context-2d-getImageData>getImageData</a>(double sx, double sy, double sw, double sh);
+  void <a href=#dom-context-2d-putimagedata title=dom-context-2d-putImageData>putImageData</a>(<a href=#imagedata>ImageData</a> imagedata, double dx, double dy);
+  void <a href=#dom-context-2d-putimagedata title=dom-context-2d-putImageData>putImageData</a>(<a href=#imagedata>ImageData</a> imagedata, double dx, double dy, double dirtyX, double dirtyY, double dirtyWidth, double dirtyHeight);
 };
 <a href=#canvasrenderingcontext2d>CanvasRenderingContext2D</a> implements <a href=#canvasdrawingstyles>CanvasDrawingStyles</a>;
 <a href=#canvasrenderingcontext2d>CanvasRenderingContext2D</a> implements <a href=#canvaspathmethods>CanvasPathMethods</a>;
@@ -39956,9 +39956,8 @@
    <dd>
 
     <p>Returns an <code><a href=#imagedata>ImageData</a></code> object with the given
-    dimensions in CSS pixels (which might map to a different number of
-    actual device pixels exposed by the object itself). All the pixels
-    in the returned object are transparent black.</p>
+    dimensions. All the pixels in the returned object are transparent
+    black.</p>
 
    </dd>
 
@@ -39984,6 +39983,9 @@
     exception if the either of the width or height arguments are
     zero.</p>
 
+    <p>The data will be returned with one pixel of image data for each
+    coordinate space unit on the canvas (ignoring transforms).</p>
+
    </dd>
 
    <dt><var title="">imagedata</var> . <code title=dom-imagedata-width><a href=#dom-imagedata-width>width</a></code></dt>
@@ -40021,6 +40023,9 @@
     <p>Throws a <code><a href=#notsupportederror>NotSupportedError</a></code> exception if any of the
     arguments are not finite.</p>
 
+    <p>Each pixel in the image data is mapped to one coordinate space
+    unit on the canvas.</p>
+
    </dd>
 
   </dl><div class=impl>
@@ -40029,12 +40034,13 @@
   method is used to instantiate new blank <code><a href=#imagedata>ImageData</a></code>
   objects. When the method is invoked with two arguments <var title="">sw</var> and <var title="">sh</var>, it must return an
   <code><a href=#imagedata>ImageData</a></code> object representing a rectangle with a width
-  in CSS pixels equal to the absolute magnitude of <var title="">sw</var> and a height in CSS pixels equal to the absolute
-  magnitude of <var title="">sh</var>. When invoked with a single <var title="">imagedata</var> argument, it must return an
-  <code><a href=#imagedata>ImageData</a></code> object representing a rectangle with the same
-  dimensions as the <code><a href=#imagedata>ImageData</a></code> object passed as the
-  argument. The <code><a href=#imagedata>ImageData</a></code> object returned must be filled
-  with transparent black.</p>
+  in equal to the absolute magnitude of <var title="">sw</var> and a
+  height equal to the absolute magnitude of <var title="">sh</var>.
+  When invoked with a single <var title="">imagedata</var> argument,
+  it must return an <code><a href=#imagedata>ImageData</a></code> object representing a
+  rectangle with the same dimensions as the <code><a href=#imagedata>ImageData</a></code>
+  object passed as the argument. The <code><a href=#imagedata>ImageData</a></code> object
+  returned must be filled with transparent black.</p>
 
   <p>The <dfn id=dom-context-2d-getimagedata title=dom-context-2d-getImageData><code>getImageData(<var title="">sx</var>, <var title="">sy</var>, <var title="">sw</var>,
   <var title="">sh</var>)</code></dfn> method must,
@@ -40042,7 +40048,7 @@
   if the <code><a href=#the-canvas-element>canvas</a></code> element's <i>origin-clean</i> flag is set
   to false, throw a <code><a href=#securityerror>SecurityError</a></code> exception; otherwise, it
 <!--REMOVE-TOPIC:Security-->
-  must return an <code><a href=#imagedata>ImageData</a></code> object representing the
+  must return an <code><a href=#imagedata>ImageData</a></code> object with width <var title="">sw</var> and height <var title="">sh</var> representing the
   underlying pixel data for the area of the canvas denoted by the
   rectangle whose corners are the four points (<var title="">sx</var>,
   <var title="">sy</var>), (<span title=""><var title="">sx</var>+<var title="">sw</var></span>, <var title="">sy</var>), (<span title=""><var title="">sx</var>+<var title="">sw</var></span>, <span title=""><var title="">sy</var>+<var title="">sh</var></span>),
@@ -40050,23 +40056,18 @@
   outside the canvas must be returned as transparent black. Pixels
   must be returned as non-premultiplied alpha values.</p>
 
-  <p>If any of the arguments to <code title=dom-context-2d-createImageData><a href=#dom-context-2d-createimagedata>createImageData()</a></code> or
-  <code title=dom-context-2d-getImageData><a href=#dom-context-2d-getimagedata>getImageData()</a></code>
-  are infinite or NaN, the method must instead throw a
-  <code><a href=#notsupportederror>NotSupportedError</a></code> exception. If either the <var title="">sw</var> or <var title="">sh</var> arguments are zero,
-  the method must instead throw an <code><a href=#indexsizeerror>IndexSizeError</a></code>
-  exception.</p>
+  <p>If either the <var title="">sw</var> or <var title="">sh</var>
+  arguments are zero, the method must instead throw an
+  <code><a href=#indexsizeerror>IndexSizeError</a></code> exception.</p>
 
   <p><code><a href=#imagedata>ImageData</a></code> objects must be initialized so that their
   <dfn id=dom-imagedata-width title=dom-imagedata-width><code>width</code></dfn> attribute
-  is set to <var title="">w</var>, the number of physical device
-  pixels per row in the image data, their <dfn id=dom-imagedata-height title=dom-imagedata-height><code>height</code></dfn> attribute is
-  set to <var title="">h</var>, the number of rows in the image data,
-  and their <dfn id=dom-imagedata-data title=dom-imagedata-data><code>data</code></dfn>
-  attribute is initialized to a <code><a href=#uint8clampedarray>Uint8ClampedArray</a></code> object.
-  The <code><a href=#uint8clampedarray>Uint8ClampedArray</a></code> object must use a <a href=#canvas-pixel-arraybuffer>Canvas
-  Pixel <code>ArrayBuffer</code></a> for its storage, and must have
-  a zero start offset and a length equal to the length of its storage,
+  is set to the number of pixels per row in the image data, their <dfn id=dom-imagedata-height title=dom-imagedata-height><code>height</code></dfn> attribute is
+  set to the number of rows in the image data, and their <dfn id=dom-imagedata-data title=dom-imagedata-data><code>data</code></dfn> attribute is
+  initialized to a <code><a href=#uint8clampedarray>Uint8ClampedArray</a></code> object. The
+  <code><a href=#uint8clampedarray>Uint8ClampedArray</a></code> object must use a <a href=#canvas-pixel-arraybuffer>Canvas Pixel
+  <code>ArrayBuffer</code></a> for its storage, and must have a
+  zero start offset and a length equal to the length of its storage,
   in bytes. The <a href=#canvas-pixel-arraybuffer>Canvas Pixel <code>ArrayBuffer</code></a>
   must contain the image data. At least one pixel's worth of image
   data must be returned. <a href=#refsTYPEDARRAY>[TYPEDARRAY]</a></p>
@@ -40075,18 +40076,15 @@
   <code><a href=#arraybuffer>ArrayBuffer</a></code> that whose data is represented in
   left-to-right order, row by row top to bottom, starting with the top
   left, with each pixel's red, green, blue, and alpha components being
-  given in that order for each pixel. Each component of each device
-  pixel represented in this array must be in the range 0..255,
-  representing the 8 bit value for that component. The components must
-  be assigned consecutive indices starting with 0 for the top left
-  pixel's red component. <a href=#refsTYPEDARRAY>[TYPEDARRAY]</a></p>
+  given in that order for each pixel. Each component of each pixel
+  represented in this array must be in the range 0..255, representing
+  the 8 bit value for that component. The components must be assigned
+  consecutive indices starting with 0 for the top left pixel's red
+  component. <a href=#refsTYPEDARRAY>[TYPEDARRAY]</a></p>
 
   <p>The <dfn id=dom-context-2d-putimagedata title=dom-context-2d-putImageData><code>putImageData(<var title="">imagedata</var>, <var title="">dx</var>, <var title="">dy</var>, <var title="">dirtyX</var>, <var title="">dirtyY</var>, <var title="">dirtyWidth</var>, <var title="">dirtyHeight</var>)</code></dfn> method writes data from
   <code><a href=#imagedata>ImageData</a></code> structures back to the canvas.</p>
 
-  <p>If any of the arguments to the method are infinite or NaN, the
-  method must throw a <code><a href=#notsupportederror>NotSupportedError</a></code> exception.</p>
-
   <p>When the last four arguments are omitted, they must be assumed to
   have the values 0, 0, the <code title=dom-imagedata-width><a href=#dom-imagedata-width>width</a></code> member of the <var title="">imagedata</var> structure, and the <code title=dom-imagedata-height><a href=#dom-imagedata-height>height</a></code> member of the <var title="">imagedata</var> structure, respectively.</p>
 
@@ -40096,20 +40094,6 @@
 
   <ol><li>
 
-    <p>Let <var title="">dx<sub>device</sub></var> be the x-coordinate
-    of the device pixel in the underlying pixel data of the canvas
-    corresponding to the <var title="">dx</var> coordinate in the
-    canvas coordinate space.</p>
-
-    <p>Let <var title="">dy<sub>device</sub></var> be the y-coordinate
-    of the device pixel in the underlying pixel data of the canvas
-    corresponding to the <var title="">dy</var> coordinate in the
-    canvas coordinate space.</p>
-
-   </li>
-
-   <li>
-
     <p>If <var title="">dirtyWidth</var> is negative, let <var title="">dirtyX</var> be <span title=""><var title="">dirtyX</var>+<var title="">dirtyWidth</var></span>, and let <var title="">dirtyWidth</var> be equal to the absolute magnitude of
     <var title="">dirtyWidth</var>.</p>
 
@@ -40146,15 +40130,63 @@
 
    </li>
 
+   <li>
+
+    <p>Draw the region of the image data in the horizontal rectangle
+    whose top left corner is at (<var title="">dirtyX</var>,<var title="">dirtyY</var>) and whose bottom right corner is at (<span title=""><var title="">dirtyX</var>+<var title="">dirtyWidth</var></span>,<span title=""><var title="">dirtyY</var>+<var title="">dirtyHeight</var></span>) onto
+    the canvas, aligned such that the top left of the rectangle is at
+    coordinate (<var title="">dx</var>,<var title="">dy</var>).</p>
+
+    <p>If the <code title=dom-context-2d-imageSmoothingEnabled><a href=#dom-context-2d-imagesmoothingenabled>imageSmoothingEnabled</a></code>
+    attribute is set to true, then the user agent should attempt to
+    apply a smoothing algorithm to the image data if the canvas does
+    not have exactly one device pixel per coordinate space unit in its
+    underlying pixel data.</p>
+
+   </li>
+
+  </ol><!-- XXXXX
+
+   <li>
+
+    <p>Let <var title="">scale</var> be the number of device pixels in
+    the underlying pixel data of the canvas per coordinate space
+    unit.</p>
+
+   </li>
+
+   <li>
+
+    <p>Let <var title="">dx<sub>device</sub></var> be the x-coordinate
+    of the device pixel in the underlying pixel data of the canvas
+    corresponding to the <var title="">dx</var> coordinate in the
+    canvas coordinate space.</p>
+
+    <p>Let <var title="">dy<sub>device</sub></var> be the y-coordinate
+    of the device pixel in the underlying pixel data of the canvas
+    corresponding to the <var title="">dy</var> coordinate in the
+    canvas coordinate space.</p>
+
+   </li>
+
    <li><p>Otherwise, for all integer values of <var title="">x</var>
-   and <var title="">y</var> where <span title=""><var title="">dirtyX</var> ≤ <var title="">x</var> < <span title=""><var title="">dirtyX</var>+<var title="">dirtyWidth</var></span></span>
-   and <span title=""><var title="">dirtyY</var> ≤ <var title="">y</var> < <span title=""><var title="">dirtyY</var>+<var title="">dirtyHeight</var></span></span>, copy the four channels of
-   the pixel with coordinate (<var title="">x</var>, <var title="">y</var>) in the <var title="">imagedata</var> data
-   structure to the pixel with coordinate (<span title=""><var title="">dx<sub>device</sub></var>+<var title="">x</var></span>,
-   <span title=""><var title="">dy<sub>device</sub></var>+<var title="">y</var></span>) in the underlying pixel data of the
-   canvas.</li>
+   and <var title="">y</var> where <span title=""><var
+   title="">dirtyX</var> ≤ <var
+   title="">x</var> < <span title=""><var
+   title="">dirtyX</var>+<var title="">dirtyWidth</var></span></span>
+   and <span title=""><var title="">dirtyY</var> ≤ <var
+   title="">y</var> < <span title=""><var
+   title="">dirtyY</var>+<var
+   title="">dirtyHeight</var></span></span>, copy the four channels of
+   the pixel with coordinate (<var title="">x</var>, <var
+   title="">y</var>) in the <var title="">imagedata</var> data
+   structure to the pixel with coordinate (<span title=""><var
+   title="">dx<sub>device</sub></var>+<var title="">x</var></span>,
+   <span title=""><var title="">dy<sub>device</sub></var>+<var
+   title="">y</var></span>) in the underlying pixel data of the
+   canvas.</p></li>
 
-  </ol><p>The handling of pixel rounding when the specified coordinates do
+  <p>The handling of pixel rounding when the specified coordinates do
   not exactly map to the device coordinate space is not defined by
   this specification, except that the following must result in no
   visible changes to the rendering:</p>
@@ -40162,33 +40194,41 @@
   <pre>context.putImageData(context.getImageData(x, y, w, h), p, q);</pre>
 
   <p>...for any value of <var title="">x</var>, <var title="">y</var>,
-  <var title="">w</var>, and <var title="">h</var> and where <var title="">p</var> is the smaller of <var title="">x</var> and the sum
-  of <var title="">x</var> and <var title="">w</var>, and <var title="">q</var> is the smaller of <var title="">y</var> and the sum
+  <var title="">w</var>, and <var title="">h</var> and where <var
+  title="">p</var> is the smaller of <var title="">x</var> and the sum
+  of <var title="">x</var> and <var title="">w</var>, and <var
+  title="">q</var> is the smaller of <var title="">y</var> and the sum
   of <var title="">y</var> and <var title="">h</var>; and except that
   the following two calls:</p>
 
   <pre>context.createImageData(w, h);
 context.getImageData(0, 0, w, h);</pre>
 
-  <p>...must return <code><a href=#imagedata>ImageData</a></code> objects with the same
-  dimensions, for any value of <var title="">w</var> and <var title="">h</var>. In other words, while user agents may round the
+  <p>...must return <code>ImageData</code> objects with the same
+  dimensions, for any value of <var title="">w</var> and <var
+  title="">h</var>. In other words, while user agents may round the
   arguments of these methods so that they map to device pixel
   boundaries, any rounding performed must be performed consistently
-  for all of the <code title=dom-context-2d-getImageData><a href=#dom-context-2d-getimagedata>createImageData()</a></code>, <code title=dom-context-2d-getImageData><a href=#dom-context-2d-getimagedata>getImageData()</a></code> and <code title=dom-context-2d-putImageData><a href=#dom-context-2d-putimagedata>putImageData()</a></code>
+  for all of the <code
+  title="dom-context-2d-getImageData">createImageData()</code>, <code
+  title="dom-context-2d-getImageData">getImageData()</code> and <code
+  title="dom-context-2d-putImageData">putImageData()</code>
   operations.</p>
 
-  <p class=note>This implies that the data returned by <code title=dom-context-2d-getImageData><a href=#dom-context-2d-getimagedata>getImageData()</a></code> is at the
+  <p class="note">This implies that the data returned by <code
+  title="dom-context-2d-getImageData">getImageData()</code> is at the
   resolution of the canvas backing store. This is likely to not be one
   device pixel to each CSS pixel if the display used is a high
   resolution display.</p>
 
-  <p class=note>Due to the lossy nature of converting to and from
+  <p class="note">Due to the lossy nature of converting to and from
   premultiplied alpha color values, pixels that have just been set
-  using <code title=dom-context-2d-putImageData><a href=#dom-context-2d-putimagedata>putImageData()</a></code> might be
-  returned to an equivalent <code title=dom-context-2d-getImageData><a href=#dom-context-2d-getimagedata>getImageData()</a></code> as
+  using <code
+  title="dom-context-2d-putImageData">putImageData()</code> might be
+  returned to an equivalent <code
+  title="dom-context-2d-getImageData">getImageData()</code> as
   different values.</p>
-
-  <p>The current path, <a href=#transformations title=dom-context-2d-transformation>transformation matrix</a>,
+--><p>The current path, <a href=#transformations title=dom-context-2d-transformation>transformation matrix</a>,
   <a href=#shadows title=shadows>shadow attributes</a>, <a href=#dom-context-2d-globalalpha title=dom-context-2d-globalAlpha>global alpha</a>, the
   <a href=#clipping-region>clipping region</a>, and <a href=#dom-context-2d-globalcompositeoperation title=dom-context-2d-globalCompositeOperation>global composition
   operator</a> must not affect the <code title=dom-context-2d-getImageData><a href=#dom-context-2d-getimagedata>getImageData()</a></code> and <code title=dom-context-2d-putImageData><a href=#dom-context-2d-putimagedata>putImageData()</a></code>

Modified: index
===================================================================
--- index	2012-07-12 19:25:06 UTC (rev 7176)
+++ index	2012-07-16 19:16:26 UTC (rev 7177)
@@ -240,7 +240,7 @@
 
   <header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
    <hgroup><h1 class=allcaps>HTML</h1>
-    <h2 class="no-num no-toc">Living Standard — Last Updated 12 July 2012</h2>
+    <h2 class="no-num no-toc">Living Standard — Last Updated 16 July 2012</h2>
    </hgroup><dl><dt><strong>Web developer edition:</strong></dt>
     <dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
     <dt>Multiple-page version:</dt>
@@ -35812,11 +35812,11 @@
   void <a href=#dom-context-2d-addhitregion title=dom-context-2d-addHitRegion>addHitRegion</a>(<a href=#hitregionoptions>HitRegionOptions</a> options);
 
   // pixel manipulation
-  <a href=#imagedata>ImageData</a> <a href=#dom-context-2d-createimagedata title=dom-context-2d-createImageData>createImageData</a>(unrestricted double sw, unrestricted double sh);
+  <a href=#imagedata>ImageData</a> <a href=#dom-context-2d-createimagedata title=dom-context-2d-createImageData>createImageData</a>(double sw, double sh);
   <a href=#imagedata>ImageData</a> <a href=#dom-context-2d-createimagedata title=dom-context-2d-createImageData>createImageData</a>(<a href=#imagedata>ImageData</a> imagedata);
-  <a href=#imagedata>ImageData</a> <a href=#dom-context-2d-getimagedata title=dom-context-2d-getImageData>getImageData</a>(unrestricted double sx, unrestricted double sy, unrestricted double sw, unrestricted double sh);
-  void <a href=#dom-context-2d-putimagedata title=dom-context-2d-putImageData>putImageData</a>(<a href=#imagedata>ImageData</a> imagedata, unrestricted double dx, unrestricted double dy);
-  void <a href=#dom-context-2d-putimagedata title=dom-context-2d-putImageData>putImageData</a>(<a href=#imagedata>ImageData</a> imagedata, unrestricted double dx, unrestricted double dy, unrestricted double dirtyX, unrestricted double dirtyY, unrestricted double dirtyWidth, unrestricted double dirtyHeight);
+  <a href=#imagedata>ImageData</a> <a href=#dom-context-2d-getimagedata title=dom-context-2d-getImageData>getImageData</a>(double sx, double sy, double sw, double sh);
+  void <a href=#dom-context-2d-putimagedata title=dom-context-2d-putImageData>putImageData</a>(<a href=#imagedata>ImageData</a> imagedata, double dx, double dy);
+  void <a href=#dom-context-2d-putimagedata title=dom-context-2d-putImageData>putImageData</a>(<a href=#imagedata>ImageData</a> imagedata, double dx, double dy, double dirtyX, double dirtyY, double dirtyWidth, double dirtyHeight);
 };
 <a href=#canvasrenderingcontext2d>CanvasRenderingContext2D</a> implements <a href=#canvasdrawingstyles>CanvasDrawingStyles</a>;
 <a href=#canvasrenderingcontext2d>CanvasRenderingContext2D</a> implements <a href=#canvaspathmethods>CanvasPathMethods</a>;
@@ -39956,9 +39956,8 @@
    <dd>
 
     <p>Returns an <code><a href=#imagedata>ImageData</a></code> object with the given
-    dimensions in CSS pixels (which might map to a different number of
-    actual device pixels exposed by the object itself). All the pixels
-    in the returned object are transparent black.</p>
+    dimensions. All the pixels in the returned object are transparent
+    black.</p>
 
    </dd>
 
@@ -39984,6 +39983,9 @@
     exception if the either of the width or height arguments are
     zero.</p>
 
+    <p>The data will be returned with one pixel of image data for each
+    coordinate space unit on the canvas (ignoring transforms).</p>
+
    </dd>
 
    <dt><var title="">imagedata</var> . <code title=dom-imagedata-width><a href=#dom-imagedata-width>width</a></code></dt>
@@ -40021,6 +40023,9 @@
     <p>Throws a <code><a href=#notsupportederror>NotSupportedError</a></code> exception if any of the
     arguments are not finite.</p>
 
+    <p>Each pixel in the image data is mapped to one coordinate space
+    unit on the canvas.</p>
+
    </dd>
 
   </dl><div class=impl>
@@ -40029,12 +40034,13 @@
   method is used to instantiate new blank <code><a href=#imagedata>ImageData</a></code>
   objects. When the method is invoked with two arguments <var title="">sw</var> and <var title="">sh</var>, it must return an
   <code><a href=#imagedata>ImageData</a></code> object representing a rectangle with a width
-  in CSS pixels equal to the absolute magnitude of <var title="">sw</var> and a height in CSS pixels equal to the absolute
-  magnitude of <var title="">sh</var>. When invoked with a single <var title="">imagedata</var> argument, it must return an
-  <code><a href=#imagedata>ImageData</a></code> object representing a rectangle with the same
-  dimensions as the <code><a href=#imagedata>ImageData</a></code> object passed as the
-  argument. The <code><a href=#imagedata>ImageData</a></code> object returned must be filled
-  with transparent black.</p>
+  in equal to the absolute magnitude of <var title="">sw</var> and a
+  height equal to the absolute magnitude of <var title="">sh</var>.
+  When invoked with a single <var title="">imagedata</var> argument,
+  it must return an <code><a href=#imagedata>ImageData</a></code> object representing a
+  rectangle with the same dimensions as the <code><a href=#imagedata>ImageData</a></code>
+  object passed as the argument. The <code><a href=#imagedata>ImageData</a></code> object
+  returned must be filled with transparent black.</p>
 
   <p>The <dfn id=dom-context-2d-getimagedata title=dom-context-2d-getImageData><code>getImageData(<var title="">sx</var>, <var title="">sy</var>, <var title="">sw</var>,
   <var title="">sh</var>)</code></dfn> method must,
@@ -40042,7 +40048,7 @@
   if the <code><a href=#the-canvas-element>canvas</a></code> element's <i>origin-clean</i> flag is set
   to false, throw a <code><a href=#securityerror>SecurityError</a></code> exception; otherwise, it
 <!--REMOVE-TOPIC:Security-->
-  must return an <code><a href=#imagedata>ImageData</a></code> object representing the
+  must return an <code><a href=#imagedata>ImageData</a></code> object with width <var title="">sw</var> and height <var title="">sh</var> representing the
   underlying pixel data for the area of the canvas denoted by the
   rectangle whose corners are the four points (<var title="">sx</var>,
   <var title="">sy</var>), (<span title=""><var title="">sx</var>+<var title="">sw</var></span>, <var title="">sy</var>), (<span title=""><var title="">sx</var>+<var title="">sw</var></span>, <span title=""><var title="">sy</var>+<var title="">sh</var></span>),
@@ -40050,23 +40056,18 @@
   outside the canvas must be returned as transparent black. Pixels
   must be returned as non-premultiplied alpha values.</p>
 
-  <p>If any of the arguments to <code title=dom-context-2d-createImageData><a href=#dom-context-2d-createimagedata>createImageData()</a></code> or
-  <code title=dom-context-2d-getImageData><a href=#dom-context-2d-getimagedata>getImageData()</a></code>
-  are infinite or NaN, the method must instead throw a
-  <code><a href=#notsupportederror>NotSupportedError</a></code> exception. If either the <var title="">sw</var> or <var title="">sh</var> arguments are zero,
-  the method must instead throw an <code><a href=#indexsizeerror>IndexSizeError</a></code>
-  exception.</p>
+  <p>If either the <var title="">sw</var> or <var title="">sh</var>
+  arguments are zero, the method must instead throw an
+  <code><a href=#indexsizeerror>IndexSizeError</a></code> exception.</p>
 
   <p><code><a href=#imagedata>ImageData</a></code> objects must be initialized so that their
   <dfn id=dom-imagedata-width title=dom-imagedata-width><code>width</code></dfn> attribute
-  is set to <var title="">w</var>, the number of physical device
-  pixels per row in the image data, their <dfn id=dom-imagedata-height title=dom-imagedata-height><code>height</code></dfn> attribute is
-  set to <var title="">h</var>, the number of rows in the image data,
-  and their <dfn id=dom-imagedata-data title=dom-imagedata-data><code>data</code></dfn>
-  attribute is initialized to a <code><a href=#uint8clampedarray>Uint8ClampedArray</a></code> object.
-  The <code><a href=#uint8clampedarray>Uint8ClampedArray</a></code> object must use a <a href=#canvas-pixel-arraybuffer>Canvas
-  Pixel <code>ArrayBuffer</code></a> for its storage, and must have
-  a zero start offset and a length equal to the length of its storage,
+  is set to the number of pixels per row in the image data, their <dfn id=dom-imagedata-height title=dom-imagedata-height><code>height</code></dfn> attribute is
+  set to the number of rows in the image data, and their <dfn id=dom-imagedata-data title=dom-imagedata-data><code>data</code></dfn> attribute is
+  initialized to a <code><a href=#uint8clampedarray>Uint8ClampedArray</a></code> object. The
+  <code><a href=#uint8clampedarray>Uint8ClampedArray</a></code> object must use a <a href=#canvas-pixel-arraybuffer>Canvas Pixel
+  <code>ArrayBuffer</code></a> for its storage, and must have a
+  zero start offset and a length equal to the length of its storage,
   in bytes. The <a href=#canvas-pixel-arraybuffer>Canvas Pixel <code>ArrayBuffer</code></a>
   must contain the image data. At least one pixel's worth of image
   data must be returned. <a href=#refsTYPEDARRAY>[TYPEDARRAY]</a></p>
@@ -40075,18 +40076,15 @@
   <code><a href=#arraybuffer>ArrayBuffer</a></code> that whose data is represented in
   left-to-right order, row by row top to bottom, starting with the top
   left, with each pixel's red, green, blue, and alpha components being
-  given in that order for each pixel. Each component of each device
-  pixel represented in this array must be in the range 0..255,
-  representing the 8 bit value for that component. The components must
-  be assigned consecutive indices starting with 0 for the top left
-  pixel's red component. <a href=#refsTYPEDARRAY>[TYPEDARRAY]</a></p>
+  given in that order for each pixel. Each component of each pixel
+  represented in this array must be in the range 0..255, representing
+  the 8 bit value for that component. The components must be assigned
+  consecutive indices starting with 0 for the top left pixel's red
+  component. <a href=#refsTYPEDARRAY>[TYPEDARRAY]</a></p>
 
   <p>The <dfn id=dom-context-2d-putimagedata title=dom-context-2d-putImageData><code>putImageData(<var title="">imagedata</var>, <var title="">dx</var>, <var title="">dy</var>, <var title="">dirtyX</var>, <var title="">dirtyY</var>, <var title="">dirtyWidth</var>, <var title="">dirtyHeight</var>)</code></dfn> method writes data from
   <code><a href=#imagedata>ImageData</a></code> structures back to the canvas.</p>
 
-  <p>If any of the arguments to the method are infinite or NaN, the
-  method must throw a <code><a href=#notsupportederror>NotSupportedError</a></code> exception.</p>
-
   <p>When the last four arguments are omitted, they must be assumed to
   have the values 0, 0, the <code title=dom-imagedata-width><a href=#dom-imagedata-width>width</a></code> member of the <var title="">imagedata</var> structure, and the <code title=dom-imagedata-height><a href=#dom-imagedata-height>height</a></code> member of the <var title="">imagedata</var> structure, respectively.</p>
 
@@ -40096,20 +40094,6 @@
 
   <ol><li>
 
-    <p>Let <var title="">dx<sub>device</sub></var> be the x-coordinate
-    of the device pixel in the underlying pixel data of the canvas
-    corresponding to the <var title="">dx</var> coordinate in the
-    canvas coordinate space.</p>
-
-    <p>Let <var title="">dy<sub>device</sub></var> be the y-coordinate
-    of the device pixel in the underlying pixel data of the canvas
-    corresponding to the <var title="">dy</var> coordinate in the
-    canvas coordinate space.</p>
-
-   </li>
-
-   <li>
-
     <p>If <var title="">dirtyWidth</var> is negative, let <var title="">dirtyX</var> be <span title=""><var title="">dirtyX</var>+<var title="">dirtyWidth</var></span>, and let <var title="">dirtyWidth</var> be equal to the absolute magnitude of
     <var title="">dirtyWidth</var>.</p>
 
@@ -40146,15 +40130,63 @@
 
    </li>
 
+   <li>
+
+    <p>Draw the region of the image data in the horizontal rectangle
+    whose top left corner is at (<var title="">dirtyX</var>,<var title="">dirtyY</var>) and whose bottom right corner is at (<span title=""><var title="">dirtyX</var>+<var title="">dirtyWidth</var></span>,<span title=""><var title="">dirtyY</var>+<var title="">dirtyHeight</var></span>) onto
+    the canvas, aligned such that the top left of the rectangle is at
+    coordinate (<var title="">dx</var>,<var title="">dy</var>).</p>
+
+    <p>If the <code title=dom-context-2d-imageSmoothingEnabled><a href=#dom-context-2d-imagesmoothingenabled>imageSmoothingEnabled</a></code>
+    attribute is set to true, then the user agent should attempt to
+    apply a smoothing algorithm to the image data if the canvas does
+    not have exactly one device pixel per coordinate space unit in its
+    underlying pixel data.</p>
+
+   </li>
+
+  </ol><!-- XXXXX
+
+   <li>
+
+    <p>Let <var title="">scale</var> be the number of device pixels in
+    the underlying pixel data of the canvas per coordinate space
+    unit.</p>
+
+   </li>
+
+   <li>
+
+    <p>Let <var title="">dx<sub>device</sub></var> be the x-coordinate
+    of the device pixel in the underlying pixel data of the canvas
+    corresponding to the <var title="">dx</var> coordinate in the
+    canvas coordinate space.</p>
+
+    <p>Let <var title="">dy<sub>device</sub></var> be the y-coordinate
+    of the device pixel in the underlying pixel data of the canvas
+    corresponding to the <var title="">dy</var> coordinate in the
+    canvas coordinate space.</p>
+
+   </li>
+
    <li><p>Otherwise, for all integer values of <var title="">x</var>
-   and <var title="">y</var> where <span title=""><var title="">dirtyX</var> ≤ <var title="">x</var> < <span title=""><var title="">dirtyX</var>+<var title="">dirtyWidth</var></span></span>
-   and <span title=""><var title="">dirtyY</var> ≤ <var title="">y</var> < <span title=""><var title="">dirtyY</var>+<var title="">dirtyHeight</var></span></span>, copy the four channels of
-   the pixel with coordinate (<var title="">x</var>, <var title="">y</var>) in the <var title="">imagedata</var> data
-   structure to the pixel with coordinate (<span title=""><var title="">dx<sub>device</sub></var>+<var title="">x</var></span>,
-   <span title=""><var title="">dy<sub>device</sub></var>+<var title="">y</var></span>) in the underlying pixel data of the
-   canvas.</li>
+   and <var title="">y</var> where <span title=""><var
+   title="">dirtyX</var> ≤ <var
+   title="">x</var> < <span title=""><var
+   title="">dirtyX</var>+<var title="">dirtyWidth</var></span></span>
+   and <span title=""><var title="">dirtyY</var> ≤ <var
+   title="">y</var> < <span title=""><var
+   title="">dirtyY</var>+<var
+   title="">dirtyHeight</var></span></span>, copy the four channels of
+   the pixel with coordinate (<var title="">x</var>, <var
+   title="">y</var>) in the <var title="">imagedata</var> data
+   structure to the pixel with coordinate (<span title=""><var
+   title="">dx<sub>device</sub></var>+<var title="">x</var></span>,
+   <span title=""><var title="">dy<sub>device</sub></var>+<var
+   title="">y</var></span>) in the underlying pixel data of the
+   canvas.</p></li>
 
-  </ol><p>The handling of pixel rounding when the specified coordinates do
+  <p>The handling of pixel rounding when the specified coordinates do
   not exactly map to the device coordinate space is not defined by
   this specification, except that the following must result in no
   visible changes to the rendering:</p>
@@ -40162,33 +40194,41 @@
   <pre>context.putImageData(context.getImageData(x, y, w, h), p, q);</pre>
 
   <p>...for any value of <var title="">x</var>, <var title="">y</var>,
-  <var title="">w</var>, and <var title="">h</var> and where <var title="">p</var> is the smaller of <var title="">x</var> and the sum
-  of <var title="">x</var> and <var title="">w</var>, and <var title="">q</var> is the smaller of <var title="">y</var> and the sum
+  <var title="">w</var>, and <var title="">h</var> and where <var
+  title="">p</var> is the smaller of <var title="">x</var> and the sum
+  of <var title="">x</var> and <var title="">w</var>, and <var
+  title="">q</var> is the smaller of <var title="">y</var> and the sum
   of <var title="">y</var> and <var title="">h</var>; and except that
   the following two calls:</p>
 
   <pre>context.createImageData(w, h);
 context.getImageData(0, 0, w, h);</pre>
 
-  <p>...must return <code><a href=#imagedata>ImageData</a></code> objects with the same
-  dimensions, for any value of <var title="">w</var> and <var title="">h</var>. In other words, while user agents may round the
+  <p>...must return <code>ImageData</code> objects with the same
+  dimensions, for any value of <var title="">w</var> and <var
+  title="">h</var>. In other words, while user agents may round the
   arguments of these methods so that they map to device pixel
   boundaries, any rounding performed must be performed consistently
-  for all of the <code title=dom-context-2d-getImageData><a href=#dom-context-2d-getimagedata>createImageData()</a></code>, <code title=dom-context-2d-getImageData><a href=#dom-context-2d-getimagedata>getImageData()</a></code> and <code title=dom-context-2d-putImageData><a href=#dom-context-2d-putimagedata>putImageData()</a></code>
+  for all of the <code
+  title="dom-context-2d-getImageData">createImageData()</code>, <code
+  title="dom-context-2d-getImageData">getImageData()</code> and <code
+  title="dom-context-2d-putImageData">putImageData()</code>
   operations.</p>
 
-  <p class=note>This implies that the data returned by <code title=dom-context-2d-getImageData><a href=#dom-context-2d-getimagedata>getImageData()</a></code> is at the
+  <p class="note">This implies that the data returned by <code
+  title="dom-context-2d-getImageData">getImageData()</code> is at the
   resolution of the canvas backing store. This is likely to not be one
   device pixel to each CSS pixel if the display used is a high
   resolution display.</p>
 
-  <p class=note>Due to the lossy nature of converting to and from
+  <p class="note">Due to the lossy nature of converting to and from
   premultiplied alpha color values, pixels that have just been set
-  using <code title=dom-context-2d-putImageData><a href=#dom-context-2d-putimagedata>putImageData()</a></code> might be
-  returned to an equivalent <code title=dom-context-2d-getImageData><a href=#dom-context-2d-getimagedata>getImageData()</a></code> as
+  using <code
+  title="dom-context-2d-putImageData">putImageData()</code> might be
+  returned to an equivalent <code
+  title="dom-context-2d-getImageData">getImageData()</code> as
   different values.</p>
-
-  <p>The current path, <a href=#transformations title=dom-context-2d-transformation>transformation matrix</a>,
+--><p>The current path, <a href=#transformations title=dom-context-2d-transformation>transformation matrix</a>,
   <a href=#shadows title=shadows>shadow attributes</a>, <a href=#dom-context-2d-globalalpha title=dom-context-2d-globalAlpha>global alpha</a>, the
   <a href=#clipping-region>clipping region</a>, and <a href=#dom-context-2d-globalcompositeoperation title=dom-context-2d-globalCompositeOperation>global composition
   operator</a> must not affect the <code title=dom-context-2d-getImageData><a href=#dom-context-2d-getimagedata>getImageData()</a></code> and <code title=dom-context-2d-putImageData><a href=#dom-context-2d-putimagedata>putImageData()</a></code>

Modified: source
===================================================================
--- source	2012-07-12 19:25:06 UTC (rev 7176)
+++ source	2012-07-16 19:16:26 UTC (rev 7177)
@@ -41730,11 +41730,11 @@
   void <span title="dom-context-2d-addHitRegion">addHitRegion</span>(<span>HitRegionOptions</span> options);
 
   // pixel manipulation
-  <span>ImageData</span> <span title="dom-context-2d-createImageData">createImageData</span>(unrestricted double sw, unrestricted double sh);
+  <span>ImageData</span> <span title="dom-context-2d-createImageData">createImageData</span>(double sw, double sh);
   <span>ImageData</span> <span title="dom-context-2d-createImageData">createImageData</span>(<span>ImageData</span> imagedata);
-  <span>ImageData</span> <span title="dom-context-2d-getImageData">getImageData</span>(unrestricted double sx, unrestricted double sy, unrestricted double sw, unrestricted double sh);
-  void <span title="dom-context-2d-putImageData">putImageData</span>(<span>ImageData</span> imagedata, unrestricted double dx, unrestricted double dy);
-  void <span title="dom-context-2d-putImageData">putImageData</span>(<span>ImageData</span> imagedata, unrestricted double dx, unrestricted double dy, unrestricted double dirtyX, unrestricted double dirtyY, unrestricted double dirtyWidth, unrestricted double dirtyHeight);
+  <span>ImageData</span> <span title="dom-context-2d-getImageData">getImageData</span>(double sx, double sy, double sw, double sh);
+  void <span title="dom-context-2d-putImageData">putImageData</span>(<span>ImageData</span> imagedata, double dx, double dy);
+  void <span title="dom-context-2d-putImageData">putImageData</span>(<span>ImageData</span> imagedata, double dx, double dy, double dirtyX, double dirtyY, double dirtyWidth, double dirtyHeight);
 };
 <span>CanvasRenderingContext2D</span> implements <span>CanvasDrawingStyles</span>;
 <span>CanvasRenderingContext2D</span> implements <span>CanvasPathMethods</span>;
@@ -46671,9 +46671,8 @@
    <dd>
 
     <p>Returns an <code>ImageData</code> object with the given
-    dimensions in CSS pixels (which might map to a different number of
-    actual device pixels exposed by the object itself). All the pixels
-    in the returned object are transparent black.</p>
+    dimensions. All the pixels in the returned object are transparent
+    black.</p>
 
    </dd>
 
@@ -46699,6 +46698,9 @@
     exception if the either of the width or height arguments are
     zero.</p>
 
+    <p>The data will be returned with one pixel of image data for each
+    coordinate space unit on the canvas (ignoring transforms).</p>
+
    </dd>
 
    <dt><var title="">imagedata</var> . <code title="dom-imagedata-width">width</code></dt>
@@ -46737,6 +46739,9 @@
     <p>Throws a <code>NotSupportedError</code> exception if any of the
     arguments are not finite.</p>
 
+    <p>Each pixel in the image data is mapped to one coordinate space
+    unit on the canvas.</p>
+
    </dd>
 
   </dl>
@@ -46749,14 +46754,13 @@
   objects. When the method is invoked with two arguments <var
   title="">sw</var> and <var title="">sh</var>, it must return an
   <code>ImageData</code> object representing a rectangle with a width
-  in CSS pixels equal to the absolute magnitude of <var
-  title="">sw</var> and a height in CSS pixels equal to the absolute
-  magnitude of <var title="">sh</var>. When invoked with a single <var
-  title="">imagedata</var> argument, it must return an
-  <code>ImageData</code> object representing a rectangle with the same
-  dimensions as the <code>ImageData</code> object passed as the
-  argument. The <code>ImageData</code> object returned must be filled
-  with transparent black.</p>
+  in equal to the absolute magnitude of <var title="">sw</var> and a
+  height equal to the absolute magnitude of <var title="">sh</var>.
+  When invoked with a single <var title="">imagedata</var> argument,
+  it must return an <code>ImageData</code> object representing a
+  rectangle with the same dimensions as the <code>ImageData</code>
+  object passed as the argument. The <code>ImageData</code> object
+  returned must be filled with transparent black.</p>
 
   <p>The <dfn
   title="dom-context-2d-getImageData"><code>getImageData(<var
@@ -46766,7 +46770,8 @@
   if the <code>canvas</code> element's <i>origin-clean</i> flag is set
   to false, throw a <code>SecurityError</code> exception; otherwise, it
 <!--REMOVE-TOPIC:Security-->
-  must return an <code>ImageData</code> object representing the
+  must return an <code>ImageData</code> object with width <var
+  title="">sw</var> and height <var title="">sh</var> representing the
   underlying pixel data for the area of the canvas denoted by the
   rectangle whose corners are the four points (<var title="">sx</var>,
   <var title="">sy</var>), (<span title=""><var title="">sx</var>+<var
@@ -46778,39 +46783,34 @@
   outside the canvas must be returned as transparent black. Pixels
   must be returned as non-premultiplied alpha values.</p>
 
-  <p>If any of the arguments to <code
-  title="dom-context-2d-createImageData">createImageData()</code> or
-  <code title="dom-context-2d-getImageData">getImageData()</code>
-  are infinite or NaN, the method must instead throw a
-  <code>NotSupportedError</code> exception. If either the <var
-  title="">sw</var> or <var title="">sh</var> arguments are zero,
-  the method must instead throw an <code>IndexSizeError</code>
-  exception.</p>
+  <p>If either the <var title="">sw</var> or <var title="">sh</var>
+  arguments are zero, the method must instead throw an
+  <code>IndexSizeError</code> exception.</p>
 
   <p><code>ImageData</code> objects must be initialized so that their
   <dfn title="dom-imagedata-width"><code>width</code></dfn> attribute
-  is set to <var title="">w</var>, the number of physical device
-  pixels per row in the image data, their <dfn
+  is set to the number of pixels per row in the image data, their <dfn
   title="dom-imagedata-height"><code>height</code></dfn> attribute is
-  set to <var title="">h</var>, the number of rows in the image data,
-  and their <dfn title="dom-imagedata-data"><code>data</code></dfn>
-  attribute is initialized to a <code>Uint8ClampedArray</code> object.
-  The <code>Uint8ClampedArray</code> object must use a <span>Canvas
-  Pixel <code>ArrayBuffer</code></span> for its storage, and must have
-  a zero start offset and a length equal to the length of its storage,
+  set to the number of rows in the image data, and their <dfn
+  title="dom-imagedata-data"><code>data</code></dfn> attribute is
+  initialized to a <code>Uint8ClampedArray</code> object. The
+  <code>Uint8ClampedArray</code> object must use a <span>Canvas Pixel
+  <code>ArrayBuffer</code></span> for its storage, and must have a
+  zero start offset and a length equal to the length of its storage,
   in bytes. The <span>Canvas Pixel <code>ArrayBuffer</code></span>
   must contain the image data. At least one pixel's worth of image
-  data must be returned. <a href="#refsTYPEDARRAY">[TYPEDARRAY]</a></p>
+  data must be returned. <a
+  href="#refsTYPEDARRAY">[TYPEDARRAY]</a></p>
 
   <p>A <dfn>Canvas Pixel <code>ArrayBuffer</code></dfn> is an
   <code>ArrayBuffer</code> that whose data is represented in
   left-to-right order, row by row top to bottom, starting with the top
   left, with each pixel's red, green, blue, and alpha components being
-  given in that order for each pixel. Each component of each device
-  pixel represented in this array must be in the range 0..255,
-  representing the 8 bit value for that component. The components must
-  be assigned consecutive indices starting with 0 for the top left
-  pixel's red component. <a href="#refsTYPEDARRAY">[TYPEDARRAY]</a></p>
+  given in that order for each pixel. Each component of each pixel
+  represented in this array must be in the range 0..255, representing
+  the 8 bit value for that component. The components must be assigned
+  consecutive indices starting with 0 for the top left pixel's red
+  component. <a href="#refsTYPEDARRAY">[TYPEDARRAY]</a></p>
 
   <p>The <dfn
   title="dom-context-2d-putImageData"><code>putImageData(<var
@@ -46820,9 +46820,6 @@
   title="">dirtyHeight</var>)</code></dfn> method writes data from
   <code>ImageData</code> structures back to the canvas.</p>
 
-  <p>If any of the arguments to the method are infinite or NaN, the
-  method must throw a <code>NotSupportedError</code> exception.</p>
-
   <p>When the last four arguments are omitted, they must be assumed to
   have the values 0, 0, the <code
   title="dom-imagedata-width">width</code> member of the <var
@@ -46839,20 +46836,6 @@
 
    <li>
 
-    <p>Let <var title="">dx<sub>device</sub></var> be the x-coordinate
-    of the device pixel in the underlying pixel data of the canvas
-    corresponding to the <var title="">dx</var> coordinate in the
-    canvas coordinate space.</p>
-
-    <p>Let <var title="">dy<sub>device</sub></var> be the y-coordinate
-    of the device pixel in the underlying pixel data of the canvas
-    corresponding to the <var title="">dy</var> coordinate in the
-    canvas coordinate space.</p>
-
-   </li>
-
-   <li>
-
     <p>If <var title="">dirtyWidth</var> is negative, let <var
     title="">dirtyX</var> be <span title=""><var title="">dirtyX</var>+<var
     title="">dirtyWidth</var></span>, and let <var
@@ -46909,6 +46892,52 @@
 
    </li>
 
+   <li>
+
+    <p>Draw the region of the image data in the horizontal rectangle
+    whose top left corner is at (<var title="">dirtyX</var>,<var
+    title="">dirtyY</var>) and whose bottom right corner is at (<span
+    title=""><var title="">dirtyX</var>+<var
+    title="">dirtyWidth</var></span>,<span title=""><var
+    title="">dirtyY</var>+<var title="">dirtyHeight</var></span>) onto
+    the canvas, aligned such that the top left of the rectangle is at
+    coordinate (<var title="">dx</var>,<var title="">dy</var>).</p>
+
+    <p>If the <code
+    title="dom-context-2d-imageSmoothingEnabled">imageSmoothingEnabled</code>
+    attribute is set to true, then the user agent should attempt to
+    apply a smoothing algorithm to the image data if the canvas does
+    not have exactly one device pixel per coordinate space unit in its
+    underlying pixel data.</p>
+
+   </li>
+
+  </ol>
+
+<!-- XXXXX
+
+   <li>
+
+    <p>Let <var title="">scale</var> be the number of device pixels in
+    the underlying pixel data of the canvas per coordinate space
+    unit.</p>
+
+   </li>
+
+   <li>
+
+    <p>Let <var title="">dx<sub>device</sub></var> be the x-coordinate
+    of the device pixel in the underlying pixel data of the canvas
+    corresponding to the <var title="">dx</var> coordinate in the
+    canvas coordinate space.</p>
+
+    <p>Let <var title="">dy<sub>device</sub></var> be the y-coordinate
+    of the device pixel in the underlying pixel data of the canvas
+    corresponding to the <var title="">dy</var> coordinate in the
+    canvas coordinate space.</p>
+
+   </li>
+
    <li><p>Otherwise, for all integer values of <var title="">x</var>
    and <var title="">y</var> where <span title=""><var
    title="">dirtyX</var> ≤ <var
@@ -46926,8 +46955,6 @@
    title="">y</var></span>) in the underlying pixel data of the
    canvas.</p></li>
 
-  </ol>
-
   <p>The handling of pixel rounding when the specified coordinates do
   not exactly map to the device coordinate space is not defined by
   this specification, except that the following must result in no
@@ -46970,6 +46997,7 @@
   returned to an equivalent <code
   title="dom-context-2d-getImageData">getImageData()</code> as
   different values.</p>
+-->
 
   <p>The current path, <span
   title="dom-context-2d-transformation">transformation matrix</span>,




More information about the Commit-Watchers mailing list