Skip to content

Commit

Permalink
[e] (0) Minor tweaks to the path stuff
Browse files Browse the repository at this point in the history
Affected topics: Canvas

git-svn-id: http://svn.whatwg.org/webapps@7018 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Mar 6, 2012
1 parent e155862 commit ef5a939
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 30 deletions.
33 changes: 19 additions & 14 deletions complete.html
Expand Up @@ -606,12 +606,13 @@ <h2 class="no-num no-toc">Living Standard &mdash; Last Updated 6 March 2012</h2>
<li><a href=#shadows><span class=secno>4.8.11.1.6 </span>Shadows</a></li>
<li><a href=#simple-shapes-(rectangles)><span class=secno>4.8.11.1.7 </span>Simple shapes (rectangles)</a></li>
<li><a href=#complex-shapes-(paths)><span class=secno>4.8.11.1.8 </span>Complex shapes (paths)</a></li>
<li><a href=#text-0><span class=secno>4.8.11.1.9 </span>Text</a></li>
<li><a href=#images><span class=secno>4.8.11.1.10 </span>Images</a></li>
<li><a href=#pixel-manipulation><span class=secno>4.8.11.1.11 </span>Pixel manipulation</a></li>
<li><a href=#drawing-model><span class=secno>4.8.11.1.12 </span>Drawing model</a></li>
<li><a href=#best-practices><span class=secno>4.8.11.1.13 </span>Best practices</a></li>
<li><a href=#examples><span class=secno>4.8.11.1.14 </span>Examples</a></ol></li>
<li><a href=#the-current-default-path><span class=secno>4.8.11.1.9 </span>The current default path</a></li>
<li><a href=#text-0><span class=secno>4.8.11.1.10 </span>Text</a></li>
<li><a href=#images><span class=secno>4.8.11.1.11 </span>Images</a></li>
<li><a href=#pixel-manipulation><span class=secno>4.8.11.1.12 </span>Pixel manipulation</a></li>
<li><a href=#drawing-model><span class=secno>4.8.11.1.13 </span>Drawing model</a></li>
<li><a href=#best-practices><span class=secno>4.8.11.1.14 </span>Best practices</a></li>
<li><a href=#examples><span class=secno>4.8.11.1.15 </span>Examples</a></ol></li>
<li><a href=#color-spaces-and-color-correction><span class=secno>4.8.11.2 </span>Color spaces and color correction</a></li>
<li><a href=#security-with-canvas-elements><span class=secno>4.8.11.3 </span>Security with <code>canvas</code> elements</a></ol></li>
<li><a href=#the-map-element><span class=secno>4.8.12 </span>The <code>map</code> element</a></li>
Expand Down Expand Up @@ -34904,7 +34905,7 @@ <h5 id=2dcontext><span class=secno>4.8.11.1 </span>The 2D context</h5>
void <a href=#dom-context-2d-fillrect title=dom-context-2d-fillRect>fillRect</a>(double x, double y, double w, double h);
void <a href=#dom-context-2d-strokerect title=dom-context-2d-strokeRect>strokeRect</a>(double x, double y, double w, double h);

// default path API (see also <a href=#canvaspathmethods>CanvasPathMethods</a>)
// current default path API (see also <a href=#canvaspathmethods>CanvasPathMethods</a>)
void <a href=#dom-context-2d-beginpath title=dom-context-2d-beginPath>beginPath</a>();
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>();
Expand Down Expand Up @@ -36432,7 +36433,11 @@ <h6 id=complex-shapes-(paths)><span class=secno>4.8.11.1.8 </span>Complex shapes

</div>

<hr><!-- XXX make this a new section --><p>The context always has a current default path. There is only one


<h6 id=the-current-default-path><span class=secno>4.8.11.1.9 </span>The current default path</h6>

<p>The context always has a current default path. There is only one
current default path, it is not part of the <a href=#drawing-state>drawing
state</a>. The current default path is a <a href=#path>path</a>, as
described in the previous section.</p>
Expand Down Expand Up @@ -36770,7 +36775,7 @@ <h6 id=complex-shapes-(paths)><span class=secno>4.8.11.1.8 </span>Complex shapes



<h6 id=text-0><span class=secno>4.8.11.1.9 </span>Text</h6> <!-- a v3 feature -->
<h6 id=text-0><span class=secno>4.8.11.1.10 </span>Text</h6> <!-- a v3 feature -->

<dl class=domintro><dt><var title="">context</var> . <code title=dom-context-2d-font><a href=#dom-context-2d-font>font</a></code> [ = <var title="">value</var> ]</dt>

Expand Down Expand Up @@ -37305,7 +37310,7 @@ <h6 id=text-0><span class=secno>4.8.11.1.9 </span>Text</h6> <!-- a v3 feature --



<h6 id=images><span class=secno>4.8.11.1.10 </span>Images</h6>
<h6 id=images><span class=secno>4.8.11.1.11 </span>Images</h6>

<p>To draw images onto the canvas, the <dfn id=dom-context-2d-drawimage title=dom-context-2d-drawImage><code>drawImage</code></dfn> method
can be used.</p>
Expand Down Expand Up @@ -37449,7 +37454,7 @@ <h6 id=images><span class=secno>4.8.11.1.10 </span>Images</h6>



<h6 id=pixel-manipulation><span class=secno>4.8.11.1.11 </span><dfn>Pixel manipulation</dfn></h6>
<h6 id=pixel-manipulation><span class=secno>4.8.11.1.12 </span><dfn>Pixel manipulation</dfn></h6>

<dl class=domintro><dt><var title="">imagedata</var> = <var title="">context</var> . <code title=dom-context-2d-createImageData><a href=#dom-context-2d-createimagedata>createImageData</a></code>(<var title="">sw</var>, <var title="">sh</var>)</dt>

Expand Down Expand Up @@ -37785,7 +37790,7 @@ <h6 id=pixel-manipulation><span class=secno>4.8.11.1.11 </span><dfn>Pixel manipu

<div class=impl>

<h6 id=drawing-model><span class=secno>4.8.11.1.12 </span><dfn>Drawing model</dfn></h6>
<h6 id=drawing-model><span class=secno>4.8.11.1.13 </span><dfn>Drawing model</dfn></h6>

<p>When a shape or image is painted, user agents must follow these
steps, in the order given (or act as if they do):</p>
Expand Down Expand Up @@ -37816,7 +37821,7 @@ <h6 id=drawing-model><span class=secno>4.8.11.1.12 </span><dfn>Drawing model</df
</ol></div>


<h6 id=best-practices><span class=secno>4.8.11.1.13 </span>Best practices</h6>
<h6 id=best-practices><span class=secno>4.8.11.1.14 </span>Best practices</h6>

<p><i>This section is non-normative.</i></p>

Expand Down Expand Up @@ -37878,7 +37883,7 @@ <h6 id=best-practices><span class=secno>4.8.11.1.13 </span>Best practices</h6>
attribute.</p>


<h6 id=examples><span class=secno>4.8.11.1.14 </span>Examples</h6>
<h6 id=examples><span class=secno>4.8.11.1.15 </span>Examples</h6>

<p><i>This section is non-normative.</i></p>

Expand Down
33 changes: 19 additions & 14 deletions index
Expand Up @@ -606,12 +606,13 @@
<li><a href=#shadows><span class=secno>4.8.11.1.6 </span>Shadows</a></li>
<li><a href=#simple-shapes-(rectangles)><span class=secno>4.8.11.1.7 </span>Simple shapes (rectangles)</a></li>
<li><a href=#complex-shapes-(paths)><span class=secno>4.8.11.1.8 </span>Complex shapes (paths)</a></li>
<li><a href=#text-0><span class=secno>4.8.11.1.9 </span>Text</a></li>
<li><a href=#images><span class=secno>4.8.11.1.10 </span>Images</a></li>
<li><a href=#pixel-manipulation><span class=secno>4.8.11.1.11 </span>Pixel manipulation</a></li>
<li><a href=#drawing-model><span class=secno>4.8.11.1.12 </span>Drawing model</a></li>
<li><a href=#best-practices><span class=secno>4.8.11.1.13 </span>Best practices</a></li>
<li><a href=#examples><span class=secno>4.8.11.1.14 </span>Examples</a></ol></li>
<li><a href=#the-current-default-path><span class=secno>4.8.11.1.9 </span>The current default path</a></li>
<li><a href=#text-0><span class=secno>4.8.11.1.10 </span>Text</a></li>
<li><a href=#images><span class=secno>4.8.11.1.11 </span>Images</a></li>
<li><a href=#pixel-manipulation><span class=secno>4.8.11.1.12 </span>Pixel manipulation</a></li>
<li><a href=#drawing-model><span class=secno>4.8.11.1.13 </span>Drawing model</a></li>
<li><a href=#best-practices><span class=secno>4.8.11.1.14 </span>Best practices</a></li>
<li><a href=#examples><span class=secno>4.8.11.1.15 </span>Examples</a></ol></li>
<li><a href=#color-spaces-and-color-correction><span class=secno>4.8.11.2 </span>Color spaces and color correction</a></li>
<li><a href=#security-with-canvas-elements><span class=secno>4.8.11.3 </span>Security with <code>canvas</code> elements</a></ol></li>
<li><a href=#the-map-element><span class=secno>4.8.12 </span>The <code>map</code> element</a></li>
Expand Down Expand Up @@ -34904,7 +34905,7 @@ dictionary <dfn id=trackeventinit>TrackEventInit</dfn> : <a href=#eventinit>Even
void <a href=#dom-context-2d-fillrect title=dom-context-2d-fillRect>fillRect</a>(double x, double y, double w, double h);
void <a href=#dom-context-2d-strokerect title=dom-context-2d-strokeRect>strokeRect</a>(double x, double y, double w, double h);

// default path API (see also <a href=#canvaspathmethods>CanvasPathMethods</a>)
// current default path API (see also <a href=#canvaspathmethods>CanvasPathMethods</a>)
void <a href=#dom-context-2d-beginpath title=dom-context-2d-beginPath>beginPath</a>();
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>();
Expand Down Expand Up @@ -36432,7 +36433,11 @@ hairline width with transform. ack Shaun Morris. -->

</div>

<hr><!-- XXX make this a new section --><p>The context always has a current default path. There is only one


<h6 id=the-current-default-path><span class=secno>4.8.11.1.9 </span>The current default path</h6>

<p>The context always has a current default path. There is only one
current default path, it is not part of the <a href=#drawing-state>drawing
state</a>. The current default path is a <a href=#path>path</a>, as
described in the previous section.</p>
Expand Down Expand Up @@ -36770,7 +36775,7 @@ hairline width with transform. ack Shaun Morris. -->



<h6 id=text-0><span class=secno>4.8.11.1.9 </span>Text</h6> <!-- a v3 feature -->
<h6 id=text-0><span class=secno>4.8.11.1.10 </span>Text</h6> <!-- a v3 feature -->

<dl class=domintro><dt><var title="">context</var> . <code title=dom-context-2d-font><a href=#dom-context-2d-font>font</a></code> [ = <var title="">value</var> ]</dt>

Expand Down Expand Up @@ -37305,7 +37310,7 @@ v6DVT (also check for '- -' bits in the part above) --><p>The <dfn id=dom-contex



<h6 id=images><span class=secno>4.8.11.1.10 </span>Images</h6>
<h6 id=images><span class=secno>4.8.11.1.11 </span>Images</h6>

<p>To draw images onto the canvas, the <dfn id=dom-context-2d-drawimage title=dom-context-2d-drawImage><code>drawImage</code></dfn> method
can be used.</p>
Expand Down Expand Up @@ -37449,7 +37454,7 @@ v6DVT (also check for '- -' bits in the part above) --><p>The <dfn id=dom-contex



<h6 id=pixel-manipulation><span class=secno>4.8.11.1.11 </span><dfn>Pixel manipulation</dfn></h6>
<h6 id=pixel-manipulation><span class=secno>4.8.11.1.12 </span><dfn>Pixel manipulation</dfn></h6>

<dl class=domintro><dt><var title="">imagedata</var> = <var title="">context</var> . <code title=dom-context-2d-createImageData><a href=#dom-context-2d-createimagedata>createImageData</a></code>(<var title="">sw</var>, <var title="">sh</var>)</dt>

Expand Down Expand Up @@ -37785,7 +37790,7 @@ function AddCloud(data, x, y) { ... }</pre>

<div class=impl>

<h6 id=drawing-model><span class=secno>4.8.11.1.12 </span><dfn>Drawing model</dfn></h6>
<h6 id=drawing-model><span class=secno>4.8.11.1.13 </span><dfn>Drawing model</dfn></h6>

<p>When a shape or image is painted, user agents must follow these
steps, in the order given (or act as if they do):</p>
Expand Down Expand Up @@ -37816,7 +37821,7 @@ function AddCloud(data, x, y) { ... }</pre>
</ol></div>


<h6 id=best-practices><span class=secno>4.8.11.1.13 </span>Best practices</h6>
<h6 id=best-practices><span class=secno>4.8.11.1.14 </span>Best practices</h6>

<p><i>This section is non-normative.</i></p>

Expand Down Expand Up @@ -37878,7 +37883,7 @@ function AddCloud(data, x, y) { ... }</pre>
attribute.</p>


<h6 id=examples><span class=secno>4.8.11.1.14 </span>Examples</h6>
<h6 id=examples><span class=secno>4.8.11.1.15 </span>Examples</h6>

<p><i>This section is non-normative.</i></p>

Expand Down
6 changes: 4 additions & 2 deletions source
Expand Up @@ -40586,7 +40586,7 @@ dictionary <dfn>TrackEventInit</dfn> : <span>EventInit</span> {
void <span title="dom-context-2d-fillRect">fillRect</span>(double x, double y, double w, double h);
void <span title="dom-context-2d-strokeRect">strokeRect</span>(double x, double y, double w, double h);

// default path API (see also <span>CanvasPathMethods</span>)
// current default path API (see also <span>CanvasPathMethods</span>)
void <span title="dom-context-2d-beginPath">beginPath</span>();
void <span title="dom-context-2d-fill">fill</span>();
void <span title="dom-context-2d-stroke">stroke</span>();
Expand Down Expand Up @@ -42424,7 +42424,9 @@ hairline width with transform. ack Shaun Morris. -->

</div>

<hr> <!-- XXX make this a new section -->


<h6>The current default path</h6>

<p>The context always has a current default path. There is only one
current default path, it is not part of the <span>drawing
Expand Down

0 comments on commit ef5a939

Please sign in to comment.