[html5] r820 - /

whatwg at whatwg.org whatwg at whatwg.org
Wed May 16 16:26:24 PDT 2007


Author: ianh
Date: 2007-05-16 16:26:23 -0700 (Wed, 16 May 2007)
New Revision: 820

Modified:
   index
   source
Log:
[agow] (2) Reference Porter-Duff for compositing operators; Add a requirement that getImageData() not be pre-multiplied (nothing else is).

Modified: index
===================================================================
--- index	2007-05-16 01:37:32 UTC (rev 819)
+++ index	2007-05-16 23:26:23 UTC (rev 820)
@@ -15869,81 +15869,87 @@
    once they have had <code title=dom-context-2d-globalAlpha><a
    href="#globalalpha">globalAlpha</a></code> and the current transformation
    matrix applied. It must be set to a value from the following list. In the
-   descriptions below, the source image is the shape or image being rendered,
-   and the destination image is the current state of the bitmap.
+   descriptions below, the source image, <var title="">A</var>, is the shape
+   or image being rendered, and the destination image, <var title="">B</var>,
+   is the current state of the bitmap.
 
-  <p class=issue>The source-* descriptions below don't define what should
-   happen with semi-transparent regions.
-
   <dl>
    <dt><dfn id=source-atop
     title=gcop-source-atop><code>source-atop</code></dfn>
 
-   <dd>Display the source image wherever both images are opaque. Display the
-    destination image wherever the destination image is opaque but the source
-    image is transparent. Display transparency elsewhere.
+   <dd><var title="">A</var> atop <var title="">B</var>. Display the source
+    image wherever both images are opaque. Display the destination image
+    wherever the destination image is opaque but the source image is
+    transparent. Display transparency elsewhere.
 
    <dt><dfn id=source-in title=gcop-source-in><code>source-in</code></dfn>
 
-   <dd>Display the source image wherever both the source image and
-    destination image are opaque. Display transparency elsewhere.
+   <dd><var title="">A</var> in <var title="">B</var>. Display the source
+    image wherever both the source image and destination image are opaque.
+    Display transparency elsewhere.
 
    <dt><dfn id=source-out title=gcop-source-out><code>source-out</code></dfn>
 
-   <dd>Display the source image wherever the source image is opaque and the
-    destination image is transparent. Display transparency elsewhere.
+   <dd><var title="">A</var> out <var title="">B</var>. Display the source
+    image wherever the source image is opaque and the destination image is
+    transparent. Display transparency elsewhere.
 
    <dt><dfn id=source-over
     title=gcop-source-over><code>source-over</code></dfn> (default)
 
-   <dd>Display the source image wherever the source image is opaque. Display
-    the destination image elsewhere.
+   <dd><var title="">A</var> over <var title="">B</var>. Display the source
+    image wherever the source image is opaque. Display the destination image
+    elsewhere.
 
    <dt><dfn id=destination-atop
     title=gcop-destination-atop><code>destination-atop</code></dfn>
 
-   <dd>Same as <code title=gcop-source-atop><a
-    href="#source-atop">source-atop</a></code> but using the destination
-    image instead of the source image and vice versa.
+   <dd><var title="">B</var> atop <var title="">A</var>. Same as <code
+    title=gcop-source-atop><a href="#source-atop">source-atop</a></code> but
+    using the destination image instead of the source image and vice versa.
 
    <dt><dfn id=destination-in
     title=gcop-destination-in><code>destination-in</code></dfn>
 
-   <dd>Same as <code title=gcop-source-in><a
-    href="#source-in">source-in</a></code> but using the destination image
-    instead of the source image and vice versa.
+   <dd><var title="">B</var> in <var title="">A</var>. Same as <code
+    title=gcop-source-in><a href="#source-in">source-in</a></code> but using
+    the destination image instead of the source image and vice versa.
 
    <dt><dfn id=destination-out
     title=gcop-destination-out><code>destination-out</code></dfn>
 
-   <dd>Same as <code title=gcop-source-out><a
-    href="#source-out">source-out</a></code> but using the destination image
-    instead of the source image and vice versa.
+   <dd><var title="">B</var> out <var title="">A</var>. Same as <code
+    title=gcop-source-out><a href="#source-out">source-out</a></code> but
+    using the destination image instead of the source image and vice versa.
 
    <dt><dfn id=destination-over
     title=gcop-destination-over><code>destination-over</code></dfn>
 
-   <dd>Same as <code title=gcop-source-over><a
-    href="#source-over">source-over</a></code> but using the destination
-    image instead of the source image and vice versa.
+   <dd><var title="">B</var> over <var title="">A</var>. Same as <code
+    title=gcop-source-over><a href="#source-over">source-over</a></code> but
+    using the destination image instead of the source image and vice versa.</dd>
+   <!-- no clear definition of this operator (doesn't correspond to a PorterDuff operator)
+   <dt><dfn title="gcop-darker"><code>darker</code></dfn></dt>
 
-   <dt><dfn id=darker title=gcop-darker><code>darker</code></dfn>
+   <dd>Display the sum of the source image and destination image,
+   with color values approaching 0 as a limit.</dd>
+-->
 
-   <dd>Display the sum of the source image and destination image, with color
-    values approaching 0 as a limit.
-
    <dt><dfn id=lighter title=gcop-lighter><code>lighter</code></dfn>
 
-   <dd>Display the sum of the source image and destination image, with color
-    values approaching 1 as a limit.
+   <dd><var title="">A</var> plus <var title="">B</var>. Display the sum of
+    the source image and destination image, with color values approaching 1
+    as a limit.
 
    <dt><dfn id=copy title=gcop-copy><code>copy</code></dfn>
 
-   <dd>Display the source image instead of the destination image.
+   <dd><var title="">A</var> (<var title="">B</var> is ignored). Display the
+    source image instead of the destination image.
 
    <dt><dfn id=xor title=gcop-xor><code>xor</code></dfn>
 
-   <dd>Exclusive OR of the source image and destination image.
+   <dd><var title="">A</var> xor <var title="">B</var>. Exclusive OR of the
+    source image and destination image.
 
    <dt><code><var title="">vendorName</var>-<var
     title="">operationName</var></code>
@@ -15956,6 +15962,15 @@
    shown. User agents must only recognise values that exactly match the
    values given above.
 
+  <p>The operators in the above list must be treated as described by the
+   Porter-Duff operator given at the start of their description (e.g. <var
+   title="">A</var> over <var title="">B</var>). <a
+   href="#refsPORTERDUFF">[PORTERDUFF]</a></p>
+  <!--
+        <dd id="refsPORTERDUFF">[PORTERDUFF]</dd>
+        <dd><cite>Compositing Digital Images</cite>, SIGGRAPH '84: Proceedings of the 11th annual conference on Computer graphics and interactive techniques, Volume 18, Number 3, T. Porter, T Duff. ACM Press, July 1984. ISBN 0-89791-138-5.</dd>
+  -->
+
   <p>On setting, if the user agent does not recognise the specified value, it
    must be ignored, leaving the value of <code
    title=dom-context-2d-globalCompositeOperation><a
@@ -16681,7 +16696,8 @@
    one corner at the (<var title="">sx</var>, <var title="">sy</var>)
    coordinate, and that has width <var title="">sw</var> and height <var
    title="">sh</var>. Pixels outside the canvas must be returned as
-   transparent black.
+   transparent black. Pixels must be returned as non-premultiplied alpha
+   values.
 
   <p><code><a href="#imagedata">ImageData</a></code> objects must be
    initialised so that their <dfn id=height5

Modified: source
===================================================================
--- source	2007-05-16 01:37:32 UTC (rev 819)
+++ source	2007-05-16 23:26:23 UTC (rev 820)
@@ -13438,83 +13438,90 @@
   bitmap, once they have had <code
   title="dom-context-2d-globalAlpha">globalAlpha</code> and the
   current transformation matrix applied. It must be set to a value
-  from the following list. In the descriptions below, the source image
-  is the shape or image being rendered, and the destination image is
-  the current state of the bitmap.</p>
+  from the following list. In the descriptions below, the source
+  image, <var title="">A</var>, is the shape or image being rendered,
+  and the destination image, <var title="">B</var>, is the current
+  state of the bitmap.</p>
 
-  <p class="issue">The source-* descriptions below don't define what
-  should happen with semi-transparent regions.</p>
-
   <dl>
 
    <dt><dfn title="gcop-source-atop"><code>source-atop</code></dfn></dt>
 
-   <dd>Display the source image wherever both images are opaque.
-   Display the destination image wherever the destination image is
-   opaque but the source image is transparent. Display transparency
-   elsewhere.</dd>
+   <dd><var title="">A</var> atop <var title="">B</var>. Display the
+   source image wherever both images are opaque.  Display the
+   destination image wherever the destination image is opaque but the
+   source image is transparent. Display transparency elsewhere.</dd>
 
    <dt><dfn title="gcop-source-in"><code>source-in</code></dfn></dt>
 
-   <dd>Display the source image wherever both the source image and
-   destination image are opaque. Display transparency elsewhere.</dd>
+   <dd><var title="">A</var> in <var title="">B</var>. Display the
+   source image wherever both the source image and destination image
+   are opaque. Display transparency elsewhere.</dd>
 
    <dt><dfn title="gcop-source-out"><code>source-out</code></dfn></dt>
 
-   <dd>Display the source image wherever the source image is opaque
-   and the destination image is transparent. Display transparency
+   <dd><var title="">A</var> out <var title="">B</var>. Display the
+   source image wherever the source image is opaque and the
+   destination image is transparent. Display transparency
    elsewhere.</dd>
 
    <dt><dfn title="gcop-source-over"><code>source-over</code></dfn> (default)</dt>
 
-   <dd>Display the source image wherever the source image is opaque.
-   Display the destination image elsewhere.</dd>
+   <dd><var title="">A</var> over <var title="">B</var>. Display the
+   source image wherever the source image is opaque.  Display the
+   destination image elsewhere.</dd>
 
 
    <dt><dfn title="gcop-destination-atop"><code>destination-atop</code></dfn></dt>
 
-   <dd>Same as <code title="gcop-source-atop">source-atop</code> but
-   using the destination image instead of the source image and vice
-   versa.</dd>
+   <dd><var title="">B</var> atop <var title="">A</var>. Same as <code
+   title="gcop-source-atop">source-atop</code> but using the
+   destination image instead of the source image and vice versa.</dd>
 
    <dt><dfn title="gcop-destination-in"><code>destination-in</code></dfn></dt>
 
-   <dd>Same as <code title="gcop-source-in">source-in</code> but using
-   the destination image instead of the source image and vice
-   versa.</dd>
+   <dd><var title="">B</var> in <var title="">A</var>. Same as <code
+   title="gcop-source-in">source-in</code> but using the destination
+   image instead of the source image and vice versa.</dd>
 
    <dt><dfn title="gcop-destination-out"><code>destination-out</code></dfn></dt>
 
-   <dd>Same as <code title="gcop-source-out">source-out</code> but
-   using the destination image instead of the source image and vice
-   versa.</dd>
+   <dd><var title="">B</var> out <var title="">A</var>. Same as <code
+   title="gcop-source-out">source-out</code> but using the destination
+   image instead of the source image and vice versa.</dd>
 
    <dt><dfn title="gcop-destination-over"><code>destination-over</code></dfn></dt>
 
-   <dd>Same as <code title="gcop-source-over">source-over</code> but
-   using the destination image instead of the source image and vice
-   versa.</dd>
+   <dd><var title="">B</var> over <var title="">A</var>. Same as <code
+   title="gcop-source-over">source-over</code> but using the
+   destination image instead of the source image and vice versa.</dd>
 
 
+<!-- no clear definition of this operator (doesn't correspond to a PorterDuff operator)
    <dt><dfn title="gcop-darker"><code>darker</code></dfn></dt>
 
    <dd>Display the sum of the source image and destination image,
    with color values approaching 0 as a limit.</dd>
+-->
 
    <dt><dfn title="gcop-lighter"><code>lighter</code></dfn></dt>
 
-   <dd>Display the sum of the source image and destination image,
-   with color values approaching 1 as a limit.</dd>
+   <dd><var title="">A</var> plus <var title="">B</var>. Display the
+   sum of the source image and destination image, with color values
+   approaching 1 as a limit.</dd>
 
 
    <dt><dfn title="gcop-copy"><code>copy</code></dfn></dt>
 
-   <dd>Display the source image instead of the destination image.</dd>
+   <dd><var title="">A</var> (<var title="">B</var> is
+   ignored). Display the source image instead of the destination
+   image.</dd>
 
 
    <dt><dfn title="gcop-xor"><code>xor</code></dfn></dt>
 
-   <dd>Exclusive OR of the source image and destination image.</dd>
+   <dd><var title="">A</var> xor <var title="">B</var>. Exclusive OR
+   of the source image and destination image.</dd>
 
 
    <dt><code><var title="">vendorName</var>-<var title="">operationName</var></code></dt>
@@ -13528,6 +13535,15 @@
   exactly as shown. User agents must only recognise values that
   exactly match the values given above.</p>
 
+  <p>The operators in the above list must be treated as described by
+  the Porter-Duff operator given at the start of their description
+  (e.g. <var title="">A</var> over <var title="">B</var>). <a
+  href="#refsPORTERDUFF">[PORTERDUFF]</a></p>
+  <!--
+        <dd id="refsPORTERDUFF">[PORTERDUFF]</dd>
+        <dd><cite>Compositing Digital Images</cite>, SIGGRAPH '84: Proceedings of the 11th annual conference on Computer graphics and interactive techniques, Volume 18, Number 3, T. Porter, T Duff. ACM Press, July 1984. ISBN 0-89791-138-5.</dd>
+  -->
+
   <p>On setting, if the user agent does not recognise the specified
   value, it must be ignored, leaving the value of <code
   title="dom-context-2d-globalCompositeOperation">globalCompositeOperation</code>
@@ -14301,7 +14317,8 @@
   corner at the (<var title="">sx</var>, <var title="">sy</var>)
   coordinate, and that has width <var title="">sw</var> and height
   <var title="">sh</var>. Pixels outside the canvas must be returned
-  as transparent black.</p>
+  as transparent black. Pixels must be returned as non-premultiplied
+  alpha values.</p>
 
   <p><code>ImageData</code> objects must be initialised so that their
   <dfn title="dom-imagedata-height"><code>height</code></dfn>




More information about the Commit-Watchers mailing list