HTML5 Tracker

Diff (omit for latest revision)
Filter

Short URL: http://html5.org/r/7112

SVNBugCommentTime (UTC)
7112[Gecko] [Internet Explorer] [Opera] [Webkit] Make imageSmoothingEnabled apply to patterns too.2012-05-31 22:36
Index: source
===================================================================
--- source	(revision 7111)
+++ source	(revision 7112)
@@ -41258,6 +41258,9 @@
   // compositing
            attribute double <span title="dom-context-2d-globalAlpha">globalAlpha</span>; // (default 1.0)
            attribute DOMString <span title="dom-context-2d-globalCompositeOperation">globalCompositeOperation</span>; // (default source-over)
+
+  // image smoothing
+           attribute boolean <span title="dom-context-2d-imageSmoothingEnabled">imageSmoothingEnabled</span>; // (default true)
 <!--
   // v7 we've also received requests for:
   - turning off antialiasing to avoid seams when patterns are painted next to each other
@@ -41312,7 +41315,6 @@
   <span>TextMetrics</span> <span title="dom-context-2d-measureText">measureText</span>(DOMString text);
 
   // drawing images
-           attribute boolean <span title="dom-context-2d-imageSmoothingEnabled">imageSmoothingEnabled</span>; // (default true)
   void <span title="dom-context-2d-drawImage">drawImage</span>((<span>HTMLImageElement</span> or <span>HTMLCanvasElement</span> or <span>HTMLVideoElement</span>) image, double dx, double dy);
   void <span title="dom-context-2d-drawImage">drawImage</span>((<span>HTMLImageElement</span> or <span>HTMLCanvasElement</span> or <span>HTMLVideoElement</span>) image, double dx, double dy, double dw, double dh);
   void <span title="dom-context-2d-drawImage">drawImage</span>((<span>HTMLImageElement</span> or <span>HTMLCanvasElement</span> or <span>HTMLVideoElement</span>) image, double sx, double sy, double sw, double sh, double dx, double dy, double dw, double dh);
@@ -44113,14 +44115,20 @@
 
     <p>If the original image data is a bitmap image, the value painted
     at a point in the area of the repetitions is computed by filtering
-    the original image data. The user agent may use any filtering
-    algorithm (for example bilinear interpolation or
-    nearest-neighbor). When the filtering algorithm requires a pixel
-    value from outside the original image data, it must instead use
-    the value from wrapping the pixel's coordinates to the original
-    image's dimensions. (That is, the filter uses 'repeat' behavior,
-    regardless of the value of <var title="">repetition</var>.)
-    <!-- drawImage() has a similar paragraph with different rules -->
+    the original image data. If the <code
+    title="dom-context-2d-imageSmoothingEnabled">imageSmoothingEnabled</code>
+    attribute is set to true, then the user agent may use any
+    filtering algorithm (for example bilinear interpolation or
+    nearest-neighbor). If the <code
+    title="dom-context-2d-imageSmoothingEnabled">imageSmoothingEnabled</code>
+    attribute is set to false, the image must be rendered using
+    nearest-neighbor interpolation. When such a filtering algorithm
+    requires a pixel value from outside the original image data, it
+    must instead use the value from wrapping the pixel's coordinates
+    to the original image's dimensions. (That is, the filter uses
+    'repeat' behavior, regardless of the value of <var
+    title="">repetition</var>.)
+    <!-- drawImage() has similar paragraphs with different rules -->
 
    </li>
 
@@ -45158,20 +45166,6 @@
 
    </dd>
 
-   <dt><var title="">context</var> . <code title="dom-context-2d-imageSmoothingEnabled">imageSmoothingEnabled</code> [ = <var title="">value</var> ]</dt>
-
-   <dd>
-
-    <p>Returns whether the <code
-    title="dom-context-2d-drawImage">drawImage()</code> method will
-    attempt to smooth the image if it has to rescale it (as opposed to
-    just rendering the image with "big pixels").</p>
-
-    <p>Can be set, to change whether images are smoothed (true) or not
-    (false).</p>
-
-   </dd>
-
   </dl>
 
   <div class="impl">
@@ -45314,13 +45308,6 @@
   title="dom-context-2d-globalCompositeOperation">global composition
   operators</span>.</p>
 
-  <p>The <dfn
-  title="dom-context-2d-imageSmoothingEnabled"><code>imageSmoothingEnabled</code></dfn>
-  attribute, on getting, must return the last value it was set to. On
-  setting, it must be set to the new value. When the
-  <code>CanvasRenderingContext2D</code> object is create, the
-  attribute must be set to true.</p>
-
   </div>
 
 
@@ -46708,7 +46695,38 @@
 
 
 
+  <h6>Image smoothing</h6>
 
+  <dl class="domintro">
+
+   <dt><var title="">context</var> . <code title="dom-context-2d-imageSmoothingEnabled">imageSmoothingEnabled</code> [ = <var title="">value</var> ]</dt>
+
+   <dd>
+
+    <p>Returns whether pattern fills and the <code
+    title="dom-context-2d-drawImage">drawImage()</code> method will
+    attempt to smooth images if they have to rescale them (as opposed
+    to just rendering the images with "big pixels").</p>
+
+    <p>Can be set, to change whether images are smoothed (true) or not
+    (false).</p>
+
+   </dd>
+
+  </dl>
+
+  <div class="impl">
+
+  <p>The <dfn
+  title="dom-context-2d-imageSmoothingEnabled"><code>imageSmoothingEnabled</code></dfn>
+  attribute, on getting, must return the last value it was set to. On
+  setting, it must be set to the new value. When the
+  <code>CanvasRenderingContext2D</code> object is created, the
+  attribute must be set to true.</p>
+
+  </div>
+
+
   <h6><dfn>Shadows</dfn></h6>
 
   <p>All drawing operations are affected by the four global shadow

|