Skip to content

Commit

Permalink
Editorial: improve clarity of canvas transform methods
Browse files Browse the repository at this point in the history
Helps with whatwg#2848.
  • Loading branch information
tawandamoyo authored Mar 11, 2024
1 parent d785cbe commit b8400b8
Showing 1 changed file with 44 additions and 24 deletions.
68 changes: 44 additions & 24 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -4076,6 +4076,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
<li>The <dfn data-x-href="https://drafts.fxtf.org/geometry/#dictdef-dompointinit"><code>DOMPointInit</code></dfn> dictionary, and associated
<dfn data-x="DOMPointInit-x" data-xref="https://drafts.fxtf.org/geometry/#dom-dompointinit-x">x</dfn> and
<dfn data-x="DOMPointInit-y" data-xref="https://drafts.fxtf.org/geometry/#dom-dompointinit-y">y</dfn> members</li>
<li><dfn data-x-href="https://drafts.fxtf.org/geometry/#matrix-multiply">Matrix multiplication</dfn></li>
</ul>

<p>The following terms are defined in the <cite>CSS Scoping</cite>: <ref>CSSSCOPING</ref></p>
Expand Down Expand Up @@ -67266,30 +67267,33 @@ try {
<ol>
<li><p>If any of the arguments are infinite or NaN, then return.</p></li>

<li><p>Replace the <span>current transformation matrix</span> with the result of multiplying the
current transformation matrix with the matrix described by:</p></li>
<li>
<p>Replace the <span>current transformation matrix</span> with the result of <span
data-x="matrix multiplication">multiplying</span> the <span>current transformation matrix</span>
with the matrix described by:</p>

<table class="matrix">
<tr>
<td><var>a</var></td>
<td><var>c</var></td>
<td><var>e</var></td>
</tr>
<tr>
<td><var>b</var></td>
<td><var>d</var></td>
<td><var>f</var></td>
</tr>
<tr>
<td>0</td>
<td>0</td>
<td>1</td>
</tr>
</table>
</li>
</ol>

</div>

<table class="matrix">
<tr>
<td><var>a</var></td>
<td><var>c</var></td>
<td><var>e</var></td>
</tr>
<tr>
<td><var>b</var></td>
<td><var>d</var></td>
<td><var>f</var></td>
</tr>
<tr>
<td>0</td>
<td>0</td>
<td>1</td>
</tr>
</table>

<p class="note">The arguments <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,
<var>e</var>, and <var>f</var> are sometimes called <var>m11</var>, <var>m12</var>,
<var>m21</var>, <var>m22</var>, <var>dx</var>, and <var>dy</var> or <var>m11</var>,
Expand Down Expand Up @@ -67317,11 +67321,27 @@ try {
<ol>
<li><p>If any of the arguments are infinite or NaN, then return.</p></li>

<li><p>Reset the <span>current transformation matrix</span> to the identity matrix.</p></li>
<li>
<p>Reset the <span>current transformation matrix</span> to the matrix described by:</p>

<li><p>Invoke the <code data-x=""><span
data-x="dom-context-2d-transform">transform</span>(<var>a</var>, <var>b</var>, <var>c</var>,
<var>d</var>, <var>e</var>, <var>f</var>)</code> method with the same arguments.</p></li>
<table class="matrix">
<tr>
<td><var>a</var></td>
<td><var>c</var></td>
<td><var>e</var></td>
</tr>
<tr>
<td><var>b</var></td>
<td><var>d</var></td>
<td><var>f</var></td>
</tr>
<tr>
<td>0</td>
<td>0</td>
<td>1</td>
</tr>
</table>
</li>
</ol>

<p>The <dfn method for="CanvasTransform"><code
Expand Down

0 comments on commit b8400b8

Please sign in to comment.