html5/canvas-api canvas-2d-api.html,1.4,1.5

Update of /sources/public/html5/canvas-api
In directory hutz:/tmp/cvs-serv16815

Modified Files:
	canvas-2d-api.html 
Log Message:
Added references to WebIDL

Index: canvas-2d-api.html
===================================================================
RCS file: /sources/public/html5/canvas-api/canvas-2d-api.html,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- canvas-2d-api.html	21 Oct 2009 21:27:06 -0000	1.4
+++ canvas-2d-api.html	29 Oct 2009 00:17:00 -0000	1.5
@@ -229,7 +229,10 @@
         <h2 id="section-canvas-interface-element"><span class="secno">2. </span>The Canvas Interface Element</h2>
         <p><strong>This section is normative.</strong> </p>
         <p>This document defines an API intended for integration into a host language, such as HTML or SVG.  The following abstract interface describes the attributes, methods, and objects that must be implemented on a <a href="#def-canvas-interface-element">canvas interface element</a> which supports this specification.  The interface name itself may be host-language dependent, as may any additional attributes, methods, and objects supported by the element.</p>
-      <p class="XXX">Which parent element the <a href="#canvas-interface-element">canvas interface element</a> derives 
+     <!-- Eliot! ADD WebIDL dependency here -->
+     	<p>The IDL fragments in this specification must be interpreted as required for conforming IDL fragments, as described in the Web IDL specification. <a href="#refsWEBIDL">[WEBIDL]</a></p>
+		<p>Except where otherwise specified, if an IDL attribute or a method argument that is a floating point number type (<code title="">float</code>) is assigned an Infinity or Not-a-Number (NaN) value, a <code><a href="#not_supported_err">NOT_SUPPORTED_ERR</a></code> exception must be raised.</p>
+	    <p class="XXX">Which parent element the <a href="#canvas-interface-element">canvas interface element</a> derives 
 	  from, how the Canvas 2D API specification relates to other technologies, or whether the interface should even be defined in this document are under discussion, and will be reflected in this draft as progress is made.</p>
 
       </div>
@@ -310,8 +313,7 @@
           <p>Returns a <code title="">data:</code> URL for the image in the canvas.</p>
         </dd>
       </dl>
-      <div class="impl">
-          <p>The <dfn id="dom-canvas-todataurl" title="dom-canvas-toDataURL"><code>toDataURL()</code></dfn> method must, when called with no arguments, return a <code title="">data:</code> URL containing a representation of the image as a PNG file. <a href="http://dev.w3.org/html5/spec/references.html#refsPNG">[PNG]</a>.</p>
+      	  <p>The <dfn id="dom-canvas-todataurl" title="dom-canvas-toDataURL"><code>toDataURL()</code></dfn> method must, when called with no arguments, return a <code title="">data:</code> URL containing a representation of the image as a PNG file. <a href="http://dev.w3.org/html5/spec/references.html#refsPNG">[PNG]</a>.</p>
         <p>If the canvas has no pixels (as when either its horizontal dimension or its vertical dimension is zero) then the method must return the string "<code title="">data:,</code>". This is the shortest <code title="">data:</code> URL 
 		and represents the empty string in a <code title="">text/plain</code> 
 		resource.</p>
@@ -321,7 +323,7 @@
 		  <p>The <code title="dom-canvas-toDataURL"><a href="#dom-canvas-todataurl">toDataURL(<var title="">type</var>)</a></code> method, when called with one <em>or more</em> arguments, must return a <code title="">data:</code> URL containing a representation of the image in the format given by <var title="">type</var>. The possible values are <a href="http://dev.w3.org/html5/spec/infrastructure.html#mime-type" title="MIME       type">MIME types</a> with no parameters, for example
       <code>image/png</code>, <code>image/jpeg</code>, or even <code>image/svg+xml</code>, if the implementation keeps enough information to reliably render an SVG image from the canvas. If the method is invoked with the first argument giving a type corresponding to one of the types given in the first column of the following table, and the user agent supports that type, then the subsequent arguments, if any, must be treated as described in the second cell of that 
 		  row.</p>
-      <table>
+	 <table>
         <thead>
           <tr>
             <th> Type </th>
@@ -859,10 +861,9 @@
         <dt><var title="">gradient</var> . <code title="dom-canvasgradient-addColorStop"><a href="#dom-canvasgradient-addcolorstop">addColorStop</a></code>(<var title="">offset</var>, <var title="">color</var>)</dt>
         <dd>
           <p>Adds a color stop with the given color to the gradient at the given offset. 0.0 is the offset at one end of the gradient, 1.0 is the offset at the other end.</p>
-          <p>If the offset is out of range, throws an <code><a href="http://dev.w3.org/html5/spec/infrastructure.html#index_size_err">INDEX_SIZE_ERR</a></code> exception. </p>
-			<p>If the color cannot be parsed, throws a <code><a href="http://dev.w3.org/html5/spec/infrastructure.html#syntax_err">SYNTAX_ERR</a></code> exception 
-			.</p>
-        </dd>
+			<p>If the offset is out of range, throws an <code><a href="http://dev.w3.org/html5/spec/infrastructure.html#index_size_err">INDEX_SIZE_ERR</a></code> exception. </p>
+			<p>If the color cannot be parsed, throws a <code><a href="http://dev.w3.org/html5/spec/infrastructure.html#syntax_err">SYNTAX_ERR</a></code> exception.</p>
+</dd>
         <dt><var title="">gradient</var> = <var title="">context</var> . <code title="dom-context-2d-createLinearGradient"><a href="#dom-context-2d-createlineargradient">createLinearGradient</a></code>(<var title="">x0</var>, <var title="">y0</var>, <var title="">x1</var>, <var title="">y1</var>)</dt>
         <dd>
           <p>Returns a <code><a href="#canvasgradient">CanvasGradient</a></code> object that represents a linear gradient that paints along the line given by the coordinates represented by the arguments.</p>
@@ -937,7 +938,7 @@
           <p>Returns a <code><a href="#canvaspattern">CanvasPattern</a></code> object that uses the given image and repeats in the direction(s) given by the <var title="">repetition</var> argument.</p>
           <p>The allowed values for <code title="">repetition</code> are <code title="">repeat</code> (both directions), <code title="">repeat-x</code> (horizontal only), <code title="">repeat-y</code> (vertical only), and <code title="">no-repeat</code> (neither). If the <var title="">repetition</var> argument is empty or null, the value
             <code title="">repeat</code> is used.</p>
-          <p>If the first argument is not an <code><a href="http://www.w3.org/TR/html5/text-level-semantics.html#the-img-element">
+		  <p>If the first argument is not an <code><a href="http://www.w3.org/TR/html5/text-level-semantics.html#the-img-element">
 		  img</a></code>,             <a href="#def-canvas-interface-element">canvas interface element</a>, 
 		  or <code><a href="http://dev.w3.org/html5/spec/video.html#video">video</a></code>  
 		  element, throws a 
@@ -946,10 +947,10 @@
 			throws an           <code><a href="http://dev.w3.org/html5/spec/infrastructure.html#invalid_state_err">INVALID_STATE_ERR</a></code> 
  
 			exception. </p>
-			<p>If the second argument is not one of the allowed values, throws a <a href="http://dev.w3.org/html5/spec/infrastructure.html#syntax_err">SYNTAX_ERR</a></code>
+			<p>If the second argument is not one of the allowed values, throws a <code><a href="http://dev.w3.org/html5/spec/infrastructure.html#syntax_err">SYNTAX_ERR</a></code>
  
 			exception.</p>
-        </dd>
+	   </dd>
       </dl>
       <div class="impl">
         <p>To create objects of this type, the <dfn id="dom-context-2d-createpattern" title="dom-context-2d-createPattern"><code>createPattern(<var title="">image</var>, <var title="">repetition</var>)</code></dfn>
@@ -1801,8 +1802,8 @@
       </dl>
       <div class="impl">
         <p>The <dfn id="dom-context-2d-createimagedata" title="dom-context-2d-createImageData"><code>createImageData()</code></dfn>
-          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
+          method is used to instantiate a new blank <code><a href="#imagedata">ImageData</a></code>
+          object. 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 return 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>,
@@ -1811,6 +1812,7 @@
           (<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>), (<var title="">sx</var>, <span title=""><var title="">sy</var>+<var title="">sh</var></span>), 
 		in canvas coordinate space units. Pixels outside the canvas must be returned as transparent black. Pixels must be returned as alpha values 
 		that have not been premultiplied.</p>
+        <!-- Eliot -->
         <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, or if the <code title="dom-context-2d-createImageData"><a href="#dom-context-2d-createimagedata">createImageData()</a></code>
           method is invoked with only one argument but that argument is null,
@@ -2114,6 +2116,7 @@
         <li>Consider changing instances of HTMLImageElement, HTMLCanvasElement, and HTMLVideoElement to more generic elements to allow SVG and other languages to supply their own equivalents.</li>
         <li>Finish reconciling normative links to HTML5 specification.</li>
         <li>Update Status section after discussion.</li>
+			<li>Correct to Infinity and Not-a-Number</li>
       </ul>
     </div>
     
@@ -2124,6 +2127,84 @@
       <h2 id="refs">B. References</h2>
       <h3 id="normrefs">Normative References</h3>
       <dl>
+       <dt id="refsBEZIER">[BEZIER]</dt>
+       <dd><cite>Courbes &#224; poles</cite>, P. de Casteljau. INPI, 1959.</dd>
+
+       <dt id="refsCSS">[CSS]</dt>
+       <dd><cite><a href="http://www.w3.org/TR/CSS/">Cascading Style Sheets Level 2
+       Revision 1</a></cite>, B. Bos, T. &#199;elik, I.
+       Hickson, H. Lie. W3C, April 2009.</dd>
+
+      <dt id="refsCSSCOLOR">[CSSCOLOR]</dt>
+       <!--
+       <dd><cite><a href="http://www.w3.org/TR/css3-color/">CSS Color
+       Module Level 3</a></cite>, T. &Ccedil;elik, C. Lilley, L.
+       Baron. W3C, July 2008.</dd>
+       -->
+       <dd><cite><a href="http://dev.w3.org/csswg/css3-color/">CSS Color
+       Module Level 3</a></cite>, T. &#199;elik, C. Lilley, L.
+       Baron. W3C, August 2008.</dd>
+      
+       <dt id="refsCSSFONTS">[CSSFONTS]</dt>
+       <dd><cite><a href="http://www.w3.org/TR/css3-fonts/">CSS Fonts
+       Module Level 3</a></cite>, J. Daggett. W3C, June 2009.</dd>
+
+       <dt id="refsCSSOM">[CSSOM]</dt>
+       <dd><cite><a href="http://dev.w3.org/csswg/cssom/">Cascading Style Sheets
+       Object Model (CSSOM)</a></cite>, A. van Kesteren. W3C, December 2007.</dd>
+
+       <dt id="refsECMA262">[ECMA262]</dt>
+       <dd><cite><a href="http://www.ecma-international.org/publications/standards/Ecma-262.htm">ECMAScript
+       Language Specification</a></cite>. ECMA, December 1999.</dd>
+
+       <dt id="refsGRAPHICS">[GRAPHICS]</dt>
+       <dd>(Non-normative) <cite>Computer Graphics: Principles and
+       Practice in C</cite>, Second Edition, J. Foley, A. van Dam,
+       S. Feiner, J. Hughes. Addison-Wesley, July 1995. ISBN 0-201-84840-6.</dd>
+      
+       <dt id="ref-HTML5"><strong class="normref">[HTML5]</strong></dt>
+       <dd><cite class="w3crec"><a href="http://www.w3.org/TR/2009/WD-html5-20090423/">HTML 5</a></cite>,
+       I. Hickson, D. Hyatt, eds.
+       World Wide Web Consortium, 23 April 2009, work in progress.
+       <br />The <a href="http://www.w3.org/TR/html5/">latest edition of HTML 5</a> is available at http://www.w3.org/TR/html5/.
+       </dd>
+
+       <dt id="refsIEEE754">[IEEE754]</dt>
+       <dd><cite><a href="http://ieeexplore.ieee.org/servlet/opac?punumber=4610933">IEEE
+       Standard for Floating-Point Arithmetic (IEEE 754)</a></cite>. IEEE,
+       August 2008. ISBN 978-0-7381-5753-5.</dd>
+
+       <dt id="refsPNG">[PNG]</dt>
+       <dd><cite><a href="http://www.w3.org/TR/PNG/">Portable Network
+       Graphics (PNG) Specification</a></cite>, D. Duce. W3C, November
+       2003.</dd>
+
+       <dt id="refsPORTERDUFF">[PORTERDUFF]</dt>
+       <dd><cite><a href="http://keithp.com/~keithp/porterduff/p253-porter.pdf">Compositing Digital Images</a></cite>, 
+       T. Porter, T. Duff. In <cite>Computer graphics</cite>, volume 18, number 3, pp. 253-259. ACM Press, July 1984.
+       </dd>
+
+       <dt id="refsRFC2119"><strong class="normref">[RFC2119]</strong></dt>
+       <dd><cite><a href="http://tools.ietf.org/html/rfc2119">Key words for use in RFCs to Indicate Requirement Levels</a></cite>,
+       S. Bradner, March 1997.
+       <br />Available at http://tools.ietf.org/html/rfc2119.
+       </dd>
+=======
+        <dt id="ref-RFC2119"><strong class="normref">[RFC2119]</strong></dt>
+        <dd><cite><a href="http://tools.ietf.org/html/rfc2119">Key words for use in RFCs to Indicate Requirement Levels</a></cite>,
+        S. Bradner, March 1997.
+        <br />Available at http://tools.ietf.org/html/rfc2119.
+        </dd>
+      
+        <dt id="ref-HTML5"><strong class="normref">[HTML5]</strong></dt>
+        <dd><cite class="w3crec"><a href="http://www.w3.org/TR/2009/WD-html5-20090423/">HTML 5</a></cite>,
+        I. Hickson, D. Hyatt, eds.
+        World Wide Web Consortium, 23 April 2009, work in progress.
+        <br />This edition of HTML 5 is http://www.w3.org/TR/2009/WD-html5-20090423/.
+        <br />The <a href="http://www.w3.org/TR/html5/">latest edition of HTML 5</a> is available at http://www.w3.org/TR/html5/.
+        </dd>
+>>>>>>> 1.1
+=======
    
        <dt id="refsBEZIER">[BEZIER]</dt>
        <dd><cite>Courbes &#224; poles</cite>, P. de Casteljau. INPI, 1959.</dd>
@@ -2183,6 +2264,15 @@
        <br />Available at http://tools.ietf.org/html/rfc2119.
        </dd>
 
+       <dt id="refsWEBIDL">[WEBIDL]</dt>
+       <!--
+       <dd><cite><a href="http://www.w3.org/TR/WebIDL/">Web
+       IDL</a></cite>, C. McCormack. W3C, December 2008.</dd>
+       -->
+       <dd><cite><a href="http://dev.w3.org/2006/webapi/WebIDL/">Web
+       IDL</a></cite>, C. McCormack. W3C, July 2009.
+       </dd>
+
       </dl>
       
       <h3 id="informrefs">Informative References</h3>

Received on Thursday, 29 October 2009 00:17:12 UTC