- From: Ian Hickson via cvs-syncmail <cvsmail@w3.org>
- Date: Thu, 24 Sep 2009 20:06:47 +0000
- To: public-html-commits@w3.org
Update of /sources/public/html5/spec In directory hutz:/tmp/cvs-serv10663 Modified Files: Overview.html Log Message: try to tweak the text on initializing the canvas (whatwg r3993) Index: Overview.html =================================================================== RCS file: /sources/public/html5/spec/Overview.html,v retrieving revision 1.3154 retrieving revision 1.3155 diff -u -d -r1.3154 -r1.3155 --- Overview.html 24 Sep 2009 20:03:30 -0000 1.3154 +++ Overview.html 24 Sep 2009 20:06:44 -0000 1.3155 @@ -21279,13 +21279,16 @@ pixels per unit in the coordinate space, so that the rendering remains at high quality throughout.</p> - <p>Whenever the <code title="attr-canvas-width"><a href="#attr-canvas-width">width</a></code> and - <code title="attr-canvas-height"><a href="#attr-canvas-height">height</a></code> attributes are set - (whether to a new value or to the previous value), the bitmap and - any associated contexts must be cleared back to their initial state - and reinitialized with the newly specified coordinate space + <p>When the <code><a href="#the-canvas-element">canvas</a></code> element is created, and subsequently + whenever the <code title="attr-canvas-width"><a href="#attr-canvas-width">width</a></code> and <code title="attr-canvas-height"><a href="#attr-canvas-height">height</a></code> attributes are set (whether + to a new value or to the previous value), the bitmap and any + associated contexts must be cleared back to their initial state and + reinitialized with the newly specified coordinate space dimensions.</p> + <p>When the canvas is initialized, its bitmap must be cleared to + transparent black.</p> + <p>The <dfn id="dom-canvas-width" title="dom-canvas-width"><code>width</code></dfn> and <dfn id="dom-canvas-height" title="dom-canvas-height"><code>height</code></dfn> IDL attributes must <a href="#reflect">reflect</a> the respective content @@ -21301,11 +21304,6 @@ context.fillRect(0,100,50,50); canvas.width = canvas.width; // clears the canvas context.fillRect(100,0,50,50); // only this square remains</pre> - </div><div class="impl"> - - <p>When the canvas is initialized it must be set to fully - transparent black.</p> - </div><p>To draw on the canvas, authors must first obtain a reference to a <dfn id="context">context</dfn> using the <dfn id="dom-canvas-getcontext" title="dom-canvas-getContext"><code>getContext(<var title="">contextId</var>)</code></dfn> method of the <code><a href="#the-canvas-element">canvas</a></code> element.<dl class="domintro"><dt><var title="">context</var> = <var title="">canvas</var> . <code title="dom-canvas-getContext"><a href="#dom-canvas-getcontext">getContext</a></code>(<var title="">contextId</var>)</dt>
Received on Thursday, 24 September 2009 20:06:57 UTC