W3C home > Mailing lists > Public > public-html-commits@w3.org > August 2010

html5/2dcontext Overview.html,1.66,1.67

From: Ian Hickson via cvs-syncmail <cvsmail@w3.org>
Date: Fri, 27 Aug 2010 19:18:24 +0000
To: public-html-commits@w3.org
Message-Id: <E1Op4RV-0001sN-04@lionel-hutz.w3.org>
Update of /sources/public/html5/2dcontext
In directory hutz:/tmp/cvs-serv7195

Modified Files:
	Overview.html 
Log Message:
Convert HTML from 'float' to 'double' throughout. THIS IS HIGHLY EXPERIMENTAL. THIS LIKELY HAS ALL KINDS OF IMPLICATIONS I HAVE NOT CONSIDERED. PLEASE SEND FEEDBACK IF THIS IS IN THE SLIGHTEST BIT PROBLEMATIC. (whatwg r5373)

Index: Overview.html
===================================================================
RCS file: /sources/public/html5/2dcontext/Overview.html,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -d -r1.66 -r1.67
--- Overview.html	27 Aug 2010 04:16:52 -0000	1.66
+++ Overview.html	27 Aug 2010 19:18:22 -0000	1.67
@@ -468,18 +468,18 @@
   // useful e.g. for when an image manipulation app uses <canvas> both for UI previews and the actual work
 -->
   // transformations (default transform is the identity matrix)
-  void <a href="#dom-context-2d-scale" title="dom-context-2d-scale">scale</a>(in float x, in float y);
-  void <a href="#dom-context-2d-rotate" title="dom-context-2d-rotate">rotate</a>(in float angle);
-  void <a href="#dom-context-2d-translate" title="dom-context-2d-translate">translate</a>(in float x, in float y);
-  void <a href="#dom-context-2d-transform" title="dom-context-2d-transform">transform</a>(in float a, in float b, in float c, in float d, in float e, in float f);
-  void <a href="#dom-context-2d-settransform" title="dom-context-2d-setTransform">setTransform</a>(in float a, in float b, in float c, in float d, in float e, in float f);
+  void <a href="#dom-context-2d-scale" title="dom-context-2d-scale">scale</a>(in double x, in double y);
+  void <a href="#dom-context-2d-rotate" title="dom-context-2d-rotate">rotate</a>(in double angle);
+  void <a href="#dom-context-2d-translate" title="dom-context-2d-translate">translate</a>(in double x, in double y);
+  void <a href="#dom-context-2d-transform" title="dom-context-2d-transform">transform</a>(in double a, in double b, in double c, in double d, in double e, in double f);
+  void <a href="#dom-context-2d-settransform" title="dom-context-2d-setTransform">setTransform</a>(in double a, in double b, in double c, in double d, in double e, in double f);
 <!--
   // v5 we've also received requests for:
   void skew(...);
   void reflect(...); // or mirror(...)
 -->
   // compositing
-           attribute float <a href="#dom-context-2d-globalalpha" title="dom-context-2d-globalAlpha">globalAlpha</a>; // (default 1.0)
+           attribute double <a href="#dom-context-2d-globalalpha" title="dom-context-2d-globalAlpha">globalAlpha</a>; // (default 1.0)
            attribute DOMString <a href="#dom-context-2d-globalcompositeoperation" title="dom-context-2d-globalCompositeOperation">globalCompositeOperation</a>; // (default source-over)
 <!--
   // v5 we've also received requests for:
@@ -493,75 +493,75 @@
   // colors and styles
            attribute any <a href="#dom-context-2d-strokestyle" title="dom-context-2d-strokeStyle">strokeStyle</a>; // (default black)
            attribute any <a href="#dom-context-2d-fillstyle" title="dom-context-2d-fillStyle">fillStyle</a>; // (default black)
-  <a href="#canvasgradient">CanvasGradient</a> <a href="#dom-context-2d-createlineargradient" title="dom-context-2d-createLinearGradient">createLinearGradient</a>(in float x0, in float y0, in float x1, in float y1);
-  <a href="#canvasgradient">CanvasGradient</a> <a href="#dom-context-2d-createradialgradient" title="dom-context-2d-createRadialGradient">createRadialGradient</a>(in float x0, in float y0, in float r0, in float x1, in float y1, in float r1);
+  <a href="#canvasgradient">CanvasGradient</a> <a href="#dom-context-2d-createlineargradient" title="dom-context-2d-createLinearGradient">createLinearGradient</a>(in double x0, in double y0, in double x1, in double y1);
+  <a href="#canvasgradient">CanvasGradient</a> <a href="#dom-context-2d-createradialgradient" title="dom-context-2d-createRadialGradient">createRadialGradient</a>(in double x0, in double y0, in double r0, in double x1, in double y1, in double r1);
   <a href="#canvaspattern">CanvasPattern</a> <a href="#dom-context-2d-createpattern" title="dom-context-2d-createPattern">createPattern</a>(in <span>HTMLImageElement</span> image, in DOMString repetition);
   <a href="#canvaspattern">CanvasPattern</a> <a href="#dom-context-2d-createpattern" title="dom-context-2d-createPattern">createPattern</a>(in <span>HTMLCanvasElement</span> image, in DOMString repetition);
   <a href="#canvaspattern">CanvasPattern</a> <a href="#dom-context-2d-createpattern" title="dom-context-2d-createPattern">createPattern</a>(in <span>HTMLVideoElement</span> image, in DOMString repetition);
 
   // line caps/joins
-           attribute float <a href="#dom-context-2d-linewidth" title="dom-context-2d-lineWidth">lineWidth</a>; // (default 1)
+           attribute double <a href="#dom-context-2d-linewidth" title="dom-context-2d-lineWidth">lineWidth</a>; // (default 1)
            attribute DOMString <a href="#dom-context-2d-linecap" title="dom-context-2d-lineCap">lineCap</a>; // "butt", "round", "square" (default "butt")
            attribute DOMString <a href="#dom-context-2d-linejoin" title="dom-context-2d-lineJoin">lineJoin</a>; // "round", "bevel", "miter" (default "miter")
-           attribute float <a href="#dom-context-2d-miterlimit" title="dom-context-2d-miterLimit">miterLimit</a>; // (default 10)
+           attribute double <a href="#dom-context-2d-miterlimit" title="dom-context-2d-miterLimit">miterLimit</a>; // (default 10)
 
   // shadows
-           attribute float <a href="#dom-context-2d-shadowoffsetx" title="dom-context-2d-shadowOffsetX">shadowOffsetX</a>; // (default 0)
-           attribute float <a href="#dom-context-2d-shadowoffsety" title="dom-context-2d-shadowOffsetY">shadowOffsetY</a>; // (default 0)
-           attribute float <a href="#dom-context-2d-shadowblur" title="dom-context-2d-shadowBlur">shadowBlur</a>; // (default 0)
+           attribute double <a href="#dom-context-2d-shadowoffsetx" title="dom-context-2d-shadowOffsetX">shadowOffsetX</a>; // (default 0)
+           attribute double <a href="#dom-context-2d-shadowoffsety" title="dom-context-2d-shadowOffsetY">shadowOffsetY</a>; // (default 0)
+           attribute double <a href="#dom-context-2d-shadowblur" title="dom-context-2d-shadowBlur">shadowBlur</a>; // (default 0)
            attribute DOMString <a href="#dom-context-2d-shadowcolor" title="dom-context-2d-shadowColor">shadowColor</a>; // (default transparent black)
 
   // rects
-  void <a href="#dom-context-2d-clearrect" title="dom-context-2d-clearRect">clearRect</a>(in float x, in float y, in float w, in float h);
-  void <a href="#dom-context-2d-fillrect" title="dom-context-2d-fillRect">fillRect</a>(in float x, in float y, in float w, in float h);
-  void <a href="#dom-context-2d-strokerect" title="dom-context-2d-strokeRect">strokeRect</a>(in float x, in float y, in float w, in float h);
+  void <a href="#dom-context-2d-clearrect" title="dom-context-2d-clearRect">clearRect</a>(in double x, in double y, in double w, in double h);
+  void <a href="#dom-context-2d-fillrect" title="dom-context-2d-fillRect">fillRect</a>(in double x, in double y, in double w, in double h);
+  void <a href="#dom-context-2d-strokerect" title="dom-context-2d-strokeRect">strokeRect</a>(in double x, in double y, in double w, in double h);
 
   // path API
   void <a href="#dom-context-2d-beginpath" title="dom-context-2d-beginPath">beginPath</a>();
   void <a href="#dom-context-2d-closepath" title="dom-context-2d-closePath">closePath</a>();
-  void <a href="#dom-context-2d-moveto" title="dom-context-2d-moveTo">moveTo</a>(in float x, in float y);
-  void <a href="#dom-context-2d-lineto" title="dom-context-2d-lineTo">lineTo</a>(in float x, in float y);
-  void <a href="#dom-context-2d-quadraticcurveto" title="dom-context-2d-quadraticCurveTo">quadraticCurveTo</a>(in float cpx, in float cpy, in float x, in float y);
-  void <a href="#dom-context-2d-beziercurveto" title="dom-context-2d-bezierCurveTo">bezierCurveTo</a>(in float cp1x, in float cp1y, in float cp2x, in float cp2y, in float x, in float y);
-  void <a href="#dom-context-2d-arcto" title="dom-context-2d-arcTo">arcTo</a>(in float x1, in float y1, in float x2, in float y2, in float radius);
-  void <a href="#dom-context-2d-rect" title="dom-context-2d-rect">rect</a>(in float x, in float y, in float w, in float h);
-  void <a href="#dom-context-2d-arc" title="dom-context-2d-arc">arc</a>(in float x, in float y, in float radius, in float startAngle, in float endAngle, in boolean anticlockwise);
+  void <a href="#dom-context-2d-moveto" title="dom-context-2d-moveTo">moveTo</a>(in double x, in double y);
+  void <a href="#dom-context-2d-lineto" title="dom-context-2d-lineTo">lineTo</a>(in double x, in double y);
+  void <a href="#dom-context-2d-quadraticcurveto" title="dom-context-2d-quadraticCurveTo">quadraticCurveTo</a>(in double cpx, in double cpy, in double x, in double y);
+  void <a href="#dom-context-2d-beziercurveto" title="dom-context-2d-bezierCurveTo">bezierCurveTo</a>(in double cp1x, in double cp1y, in double cp2x, in double cp2y, in double x, in double y);
+  void <a href="#dom-context-2d-arcto" title="dom-context-2d-arcTo">arcTo</a>(in double x1, in double y1, in double x2, in double y2, in double radius);
+  void <a href="#dom-context-2d-rect" title="dom-context-2d-rect">rect</a>(in double x, in double y, in double w, in double h);
+  void <a href="#dom-context-2d-arc" title="dom-context-2d-arc">arc</a>(in double x, in double y, in double radius, in double startAngle, in double endAngle, in boolean anticlockwise);
   void <a href="#dom-context-2d-fill" title="dom-context-2d-fill">fill</a>();
   void <a href="#dom-context-2d-stroke" title="dom-context-2d-stroke">stroke</a>();
   void <a href="#dom-context-2d-clip" title="dom-context-2d-clip">clip</a>();
-  boolean <a href="#dom-context-2d-ispointinpath" title="dom-context-2d-isPointInPath">isPointInPath</a>(in float x, in float y);
+  boolean <a href="#dom-context-2d-ispointinpath" title="dom-context-2d-isPointInPath">isPointInPath</a>(in double x, in double y);
 
   // focus management
-  boolean <a href="#dom-context-2d-drawfocusring" title="dom-context-2d-drawFocusRing">drawFocusRing</a>(in <span>Element</span> element, in float xCaret, in float yCaret, in optional boolean canDrawCustom);
+  boolean <a href="#dom-context-2d-drawfocusring" title="dom-context-2d-drawFocusRing">drawFocusRing</a>(in <span>Element</span> element, in double xCaret, in double yCaret, in optional boolean canDrawCustom);
 
   // text
            attribute DOMString <a href="#dom-context-2d-font" title="dom-context-2d-font">font</a>; // (default 10px sans-serif)
            attribute DOMString <a href="#dom-context-2d-textalign" title="dom-context-2d-textAlign">textAlign</a>; // "start", "end", "left", "right", "center" (default: "start")
            attribute DOMString <a href="#dom-context-2d-textbaseline" title="dom-context-2d-textBaseline">textBaseline</a>; // "top", "hanging", "middle", "alphabetic", "ideographic", "bottom" (default: "alphabetic")
-  void <a href="#dom-context-2d-filltext" title="dom-context-2d-fillText">fillText</a>(in DOMString text, in float x, in float y, in optional float maxWidth);
-  void <a href="#dom-context-2d-stroketext" title="dom-context-2d-strokeText">strokeText</a>(in DOMString text, in float x, in float y, in optional float maxWidth);<!-- v5DVT
-  void <span title="dom-context-2d-fillVerticalText">fillVerticalText</span>(in DOMString text, in float x, in float y, in optional float maxHeight);
-  void <span title="dom-context-2d-strokeVerticalText">strokeVerticalText</span>(in DOMString text, in float x, in float y, in optional float maxHeight); -->
+  void <a href="#dom-context-2d-filltext" title="dom-context-2d-fillText">fillText</a>(in DOMString text, in double x, in double y, in optional double maxWidth);
+  void <a href="#dom-context-2d-stroketext" title="dom-context-2d-strokeText">strokeText</a>(in DOMString text, in double x, in double y, in optional double maxWidth);<!-- v5DVT
+  void <span title="dom-context-2d-fillVerticalText">fillVerticalText</span>(in DOMString text, in double x, in double y, in optional double maxHeight);
+  void <span title="dom-context-2d-strokeVerticalText">strokeVerticalText</span>(in DOMString text, in double x, in double y, in optional double maxHeight); -->
   <a href="#textmetrics">TextMetrics</a> <a href="#dom-context-2d-measuretext" title="dom-context-2d-measureText">measureText</a>(in DOMString text);
 
   // drawing images
-  void <a href="#dom-context-2d-drawimage" title="dom-context-2d-drawImage">drawImage</a>(in <span>HTMLImageElement</span> image, in float dx, in float dy, in optional float dw, in float dh);
-  void <a href="#dom-context-2d-drawimage" title="dom-context-2d-drawImage">drawImage</a>(in <span>HTMLImageElement</span> image, in float sx, in float sy, in float sw, in float sh, in float dx, in float dy, in float dw, in float dh);
-  void <a href="#dom-context-2d-drawimage" title="dom-context-2d-drawImage">drawImage</a>(in <span>HTMLCanvasElement</span> image, in float dx, in float dy, in optional float dw, in float dh);
-  void <a href="#dom-context-2d-drawimage" title="dom-context-2d-drawImage">drawImage</a>(in <span>HTMLCanvasElement</span> image, in float sx, in float sy, in float sw, in float sh, in float dx, in float dy, in float dw, in float dh);
-  void <a href="#dom-context-2d-drawimage" title="dom-context-2d-drawImage">drawImage</a>(in <span>HTMLVideoElement</span> image, in float dx, in float dy, in optional float dw, in float dh);
-  void <a href="#dom-context-2d-drawimage" title="dom-context-2d-drawImage">drawImage</a>(in <span>HTMLVideoElement</span> image, in float sx, in float sy, in float sw, in float sh, in float dx, in float dy, in float dw, in float dh);
+  void <a href="#dom-context-2d-drawimage" title="dom-context-2d-drawImage">drawImage</a>(in <span>HTMLImageElement</span> image, in double dx, in double dy, in optional double dw, in double dh);
+  void <a href="#dom-context-2d-drawimage" title="dom-context-2d-drawImage">drawImage</a>(in <span>HTMLImageElement</span> image, in double sx, in double sy, in double sw, in double sh, in double dx, in double dy, in double dw, in double dh);
+  void <a href="#dom-context-2d-drawimage" title="dom-context-2d-drawImage">drawImage</a>(in <span>HTMLCanvasElement</span> image, in double dx, in double dy, in optional double dw, in double dh);
+  void <a href="#dom-context-2d-drawimage" title="dom-context-2d-drawImage">drawImage</a>(in <span>HTMLCanvasElement</span> image, in double sx, in double sy, in double sw, in double sh, in double dx, in double dy, in double dw, in double dh);
+  void <a href="#dom-context-2d-drawimage" title="dom-context-2d-drawImage">drawImage</a>(in <span>HTMLVideoElement</span> image, in double dx, in double dy, in optional double dw, in double dh);
+  void <a href="#dom-context-2d-drawimage" title="dom-context-2d-drawImage">drawImage</a>(in <span>HTMLVideoElement</span> image, in double sx, in double sy, in double sw, in double sh, in double dx, in double dy, in double dw, in double dh);
 
   // pixel manipulation
-  <a href="#imagedata">ImageData</a> <a href="#dom-context-2d-createimagedata" title="dom-context-2d-createImageData">createImageData</a>(in float sw, in float sh);
+  <a href="#imagedata">ImageData</a> <a href="#dom-context-2d-createimagedata" title="dom-context-2d-createImageData">createImageData</a>(in double sw, in double sh);
   <a href="#imagedata">ImageData</a> <a href="#dom-context-2d-createimagedata" title="dom-context-2d-createImageData">createImageData</a>(in <a href="#imagedata">ImageData</a> imagedata);
-  <a href="#imagedata">ImageData</a> <a href="#dom-context-2d-getimagedata" title="dom-context-2d-getImageData">getImageData</a>(in float sx, in float sy, in float sw, in float sh);
-  void <a href="#dom-context-2d-putimagedata" title="dom-context-2d-putImageData">putImageData</a>(in <a href="#imagedata">ImageData</a> imagedata, in float dx, in float dy, in optional float dirtyX, in float dirtyY, in float dirtyWidth, in float dirtyHeight);
+  <a href="#imagedata">ImageData</a> <a href="#dom-context-2d-getimagedata" title="dom-context-2d-getImageData">getImageData</a>(in double sx, in double sy, in double sw, in double sh);
+  void <a href="#dom-context-2d-putimagedata" title="dom-context-2d-putImageData">putImageData</a>(in <a href="#imagedata">ImageData</a> imagedata, in double dx, in double dy, in optional double dirtyX, in double dirtyY, in double dirtyWidth, in double dirtyHeight);
 };
 
 interface <dfn id="canvasgradient">CanvasGradient</dfn> {
   // opaque object
-  void <a href="#dom-canvasgradient-addcolorstop" title="dom-canvasgradient-addColorStop">addColorStop</a>(in float offset, in DOMString color);
+  void <a href="#dom-canvasgradient-addcolorstop" title="dom-canvasgradient-addColorStop">addColorStop</a>(in double offset, in DOMString color);
 };
 
 interface <dfn id="canvaspattern">CanvasPattern</dfn> {
@@ -569,7 +569,7 @@
 };
 
 interface <dfn id="textmetrics">TextMetrics</dfn> {
-  readonly attribute float <a href="#dom-textmetrics-width" title="dom-textmetrics-width">width</a>;
+  readonly attribute double <a href="#dom-textmetrics-width" title="dom-textmetrics-width">width</a>;
 };
 
 interface <dfn id="imagedata">ImageData</dfn> {
@@ -2680,11 +2680,14 @@
   <p>The source rectangle is 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>), (<var title="">sx</var>, <span title=""><var title="">sy</var>+<var title="">sh</var></span>).</p>
 
-  <p>If the source rectangle is not entirely within the source image,
-  or if one of the <var title="">sw</var> or <var title="">sh</var>
+  <p>If one of the <var title="">sw</var> or <var title="">sh</var>
   arguments is zero, the implementation must raise an
   <code>INDEX_SIZE_ERR</code> exception.</p>
 
+  <p>Pixels of the source rectangle that are not entirely within the
+  source image must be treated as transparent black.</p> <!-- see
+  CORE-32111 http://krijnhoetmer.nl/irc-logs/whatwg/20100818#l-737 -->
+
   <p>The destination rectangle is the rectangle whose corners are the
   four points (<var title="">dx</var>, <var title="">dy</var>),
   (<span title=""><var title="">dx</var>+<var title="">dw</var></span>, <var title="">dy</var>), (<span title=""><var title="">dx</var>+<var title="">dw</var></span>, <span title=""><var title="">dy</var>+<var title="">dh</var></span>), (<var title="">dx</var>, <span title=""><var title="">dy</var>+<var title="">dh</var></span>).</p>
Received on Friday, 27 August 2010 19:18:28 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:10:04 UTC