Skip to content

Commit

Permalink
[giow] (0) Make addHitRegion() consistent with context.fill() in usin…
Browse files Browse the repository at this point in the history
…g the context's transformation matrix, not a separate transformation.

Affected topics: Canvas

git-svn-id: http://svn.whatwg.org/webapps@7037 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Mar 28, 2012
1 parent 507d0b8 commit f62e2ad
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 49 deletions.
51 changes: 30 additions & 21 deletions complete.html
Expand Up @@ -240,7 +240,7 @@

<header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
<hgroup><h1 class=allcaps>HTML</h1>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 27 March 2012</h2>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 28 March 2012</h2>
</hgroup><dl><dt><strong>Web developer edition:</strong></dt>
<dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
<dt>Multiple-page version:</dt>
Expand Down Expand Up @@ -35042,8 +35042,8 @@ <h5 id=2dcontext><span class=secno>4.8.11.1 </span>The 2D context</h5>

dictionary <dfn id=hitregionoptions>HitRegionOptions</dfn> {
<a href=#path>Path</a>? <span title=dom-HitRegionOptions-path>path</span> = null;
<a href=#svgmatrix>SVGMatrix</a>? <span title=dom-HitRegionOptions-transform>transform</span> = null;
<span>DOMString</span> <span title=dom-HitRegionOptions-id>id</span> = '';
<!-- <span>SVGMatrix</span>? <span title="dom-HitRegionOptions-transform">transform</span> = null;
--> <span>DOMString</span> <span title=dom-HitRegionOptions-id>id</span> = '';
<span>DOMString</span>? <span title=dom-HitRegionOptions-parentID>parentID</span> = null;
<span>DOMString</span> <span title=dom-HitRegionOptions-cursor>cursor</span> = 'inherit';
// for control-backed regions:
Expand Down Expand Up @@ -38398,12 +38398,13 @@ <h6 id=hit-regions><span class=secno>4.8.11.1.13 </span>Hit regions</h6>
form part of the region. If this member is not provided or is set
to null, the <a href=#current-default-path>current default path</a> is used
instead.</dd>
<!--
<dt><code title="dom-HitRegionOptions-transform">transform</code> (default null)

<dt><code title=dom-HitRegionOptions-transform>transform</code> (default null)

<dd>An <code><a href=#svgmatrix>SVGMatrix</a></code> object that describes a
transformation to apply to the path described by the <code title=dom-HitRegionOptions-path>path</code> member.</dd>

<dd>An <code>SVGMatrix</code> object that describes a
transformation to apply to the path described by the <code
title="dom-HitRegionOptions-path">path</code> member.</dd>
-->
<dt><code title=dom-HitRegionOptions-id>id</code> (default empty string)

<dd>The ID to use for this region. This is used in
Expand Down Expand Up @@ -38591,15 +38592,22 @@ <h6 id=hit-regions><span class=secno>4.8.11.1.13 </span>Hit regions</h6>
let <var title="">source path</var> be the <code title=dom-HitRegionOptions-path>path</code> member's value.
Otherwise, let it be the <code><a href=#canvasrenderingcontext2d>CanvasRenderingContext2D</a></code>
object's <a href=#current-default-path>current default path</a>.</li>

<li><p>If the <var title="">arguments</var> object's <code title=dom-HitRegionOptions-path>path</code> member is null, but
the <code title=dom-HitRegionOptions-transform>transform</code>
member is not, then throw a <code><a href=#notsupportederror>NotSupportedError</a></code>
exception and abort these steps.</li>

<li><p>Transform all the coordinates and lines in <var title="">source path</var> by the transform matrix given by the
<var title="">arguments</var> object's <code title=dom-HitRegionOptions-transform>transform</code> member, if
it is not null.</li>
<!--
<li><p>If the <var title="">arguments</var> object's <code
title="dom-HitRegionOptions-path">path</code> member is null, but
the <code title="dom-HitRegionOptions-transform">transform</code>
member is not, then throw a <code>NotSupportedError</code>
exception and abort these steps.</p></li>

<li><p>Transform all the coordinates and lines in <var
title="">source path</var> by the transform matrix given by the
<var title="">arguments</var> object's <code
title="dom-HitRegionOptions-transform">transform</code> member, if
it is not null.</p></li>
-->
<li><p>Transform all the coordinates and lines in <var title="">source path</var> by the current transform matrix, if the
<var title="">arguments</var> object's <code title=dom-HitRegionOptions-path>path</code> member is not
null.</li>

<li><p>If the <var title="">arguments</var> object's <code title=dom-HitRegionOptions-id>id</code> member is the
empty string, let it be null instead.</li>
Expand Down Expand Up @@ -38630,11 +38638,12 @@ <h6 id=hit-regions><span class=secno>4.8.11.1.13 </span>Hit regions</h6>
<code><a href=#notsupportederror>NotSupportedError</a></code> exception and abort these
steps.</p>

<ul class=brief><li>The <var title="">arguments</var> object's <code title=dom-HitRegionOptions-path>path</code> member is null, but
its <code title=dom-HitRegionOptions-transform>transform</code>
<ul class=brief><!--
<li>The <var title="">arguments</var> object's <code
title="dom-HitRegionOptions-path">path</code> member is null, but
its <code title="dom-HitRegionOptions-transform">transform</code>
member is not.</li>

<li>The <var title="">arguments</var> object's <code title=dom-HitRegionOptions-control>control</code> and <code title=dom-HitRegionOptions-label>label</code> members are both
--><li>The <var title="">arguments</var> object's <code title=dom-HitRegionOptions-control>control</code> and <code title=dom-HitRegionOptions-label>label</code> members are both
non-null.</li>

<li>The <var title="">arguments</var> object's <code title=dom-HitRegionOptions-control>control</code> and <code title=dom-HitRegionOptions-role>role</code> members are both
Expand Down
51 changes: 30 additions & 21 deletions index
Expand Up @@ -240,7 +240,7 @@

<header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
<hgroup><h1 class=allcaps>HTML</h1>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 27 March 2012</h2>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 28 March 2012</h2>
</hgroup><dl><dt><strong>Web developer edition:</strong></dt>
<dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
<dt>Multiple-page version:</dt>
Expand Down Expand Up @@ -35042,8 +35042,8 @@ interface <dfn id=textmetrics>TextMetrics</dfn> {

dictionary <dfn id=hitregionoptions>HitRegionOptions</dfn> {
<a href=#path>Path</a>? <span title=dom-HitRegionOptions-path>path</span> = null;
<a href=#svgmatrix>SVGMatrix</a>? <span title=dom-HitRegionOptions-transform>transform</span> = null;
<span>DOMString</span> <span title=dom-HitRegionOptions-id>id</span> = '';
<!-- <span>SVGMatrix</span>? <span title="dom-HitRegionOptions-transform">transform</span> = null;
--> <span>DOMString</span> <span title=dom-HitRegionOptions-id>id</span> = '';
<span>DOMString</span>? <span title=dom-HitRegionOptions-parentID>parentID</span> = null;
<span>DOMString</span> <span title=dom-HitRegionOptions-cursor>cursor</span> = 'inherit';
// for control-backed regions:
Expand Down Expand Up @@ -38398,12 +38398,13 @@ v6DVT (also check for '- -' bits in the part above) --><p>The <dfn id=dom-contex
form part of the region. If this member is not provided or is set
to null, the <a href=#current-default-path>current default path</a> is used
instead.</dd>
<!--
<dt><code title="dom-HitRegionOptions-transform">transform</code> (default null)

<dt><code title=dom-HitRegionOptions-transform>transform</code> (default null)

<dd>An <code><a href=#svgmatrix>SVGMatrix</a></code> object that describes a
transformation to apply to the path described by the <code title=dom-HitRegionOptions-path>path</code> member.</dd>

<dd>An <code>SVGMatrix</code> object that describes a
transformation to apply to the path described by the <code
title="dom-HitRegionOptions-path">path</code> member.</dd>
-->
<dt><code title=dom-HitRegionOptions-id>id</code> (default empty string)

<dd>The ID to use for this region. This is used in
Expand Down Expand Up @@ -38591,15 +38592,22 @@ v6DVT (also check for '- -' bits in the part above) --><p>The <dfn id=dom-contex
let <var title="">source path</var> be the <code title=dom-HitRegionOptions-path>path</code> member's value.
Otherwise, let it be the <code><a href=#canvasrenderingcontext2d>CanvasRenderingContext2D</a></code>
object's <a href=#current-default-path>current default path</a>.</li>

<li><p>If the <var title="">arguments</var> object's <code title=dom-HitRegionOptions-path>path</code> member is null, but
the <code title=dom-HitRegionOptions-transform>transform</code>
member is not, then throw a <code><a href=#notsupportederror>NotSupportedError</a></code>
exception and abort these steps.</li>

<li><p>Transform all the coordinates and lines in <var title="">source path</var> by the transform matrix given by the
<var title="">arguments</var> object's <code title=dom-HitRegionOptions-transform>transform</code> member, if
it is not null.</li>
<!--
<li><p>If the <var title="">arguments</var> object's <code
title="dom-HitRegionOptions-path">path</code> member is null, but
the <code title="dom-HitRegionOptions-transform">transform</code>
member is not, then throw a <code>NotSupportedError</code>
exception and abort these steps.</p></li>

<li><p>Transform all the coordinates and lines in <var
title="">source path</var> by the transform matrix given by the
<var title="">arguments</var> object's <code
title="dom-HitRegionOptions-transform">transform</code> member, if
it is not null.</p></li>
-->
<li><p>Transform all the coordinates and lines in <var title="">source path</var> by the current transform matrix, if the
<var title="">arguments</var> object's <code title=dom-HitRegionOptions-path>path</code> member is not
null.</li>

<li><p>If the <var title="">arguments</var> object's <code title=dom-HitRegionOptions-id>id</code> member is the
empty string, let it be null instead.</li>
Expand Down Expand Up @@ -38630,11 +38638,12 @@ v6DVT (also check for '- -' bits in the part above) --><p>The <dfn id=dom-contex
<code><a href=#notsupportederror>NotSupportedError</a></code> exception and abort these
steps.</p>

<ul class=brief><li>The <var title="">arguments</var> object's <code title=dom-HitRegionOptions-path>path</code> member is null, but
its <code title=dom-HitRegionOptions-transform>transform</code>
<ul class=brief><!--
<li>The <var title="">arguments</var> object's <code
title="dom-HitRegionOptions-path">path</code> member is null, but
its <code title="dom-HitRegionOptions-transform">transform</code>
member is not.</li>

<li>The <var title="">arguments</var> object's <code title=dom-HitRegionOptions-control>control</code> and <code title=dom-HitRegionOptions-label>label</code> members are both
--><li>The <var title="">arguments</var> object's <code title=dom-HitRegionOptions-control>control</code> and <code title=dom-HitRegionOptions-label>label</code> members are both
non-null.</li>

<li>The <var title="">arguments</var> object's <code title=dom-HitRegionOptions-control>control</code> and <code title=dom-HitRegionOptions-role>role</code> members are both
Expand Down
20 changes: 13 additions & 7 deletions source
Expand Up @@ -40724,8 +40724,8 @@ interface <dfn>TextMetrics</dfn> {

dictionary <dfn>HitRegionOptions</dfn> {
<span>Path</span>? <span title="dom-HitRegionOptions-path">path</span> = null;
<span>SVGMatrix</span>? <span title="dom-HitRegionOptions-transform">transform</span> = null;
<span>DOMString</span> <span title="dom-HitRegionOptions-id">id</span> = '';
<!-- <span>SVGMatrix</span>? <span title="dom-HitRegionOptions-transform">transform</span> = null;
--> <span>DOMString</span> <span title="dom-HitRegionOptions-id">id</span> = '';
<span>DOMString</span>? <span title="dom-HitRegionOptions-parentID">parentID</span> = null;
<span>DOMString</span> <span title="dom-HitRegionOptions-cursor">cursor</span> = 'inherit';
// for control-backed regions:
Expand Down Expand Up @@ -44727,13 +44727,13 @@ v6DVT (also check for '- -' bits in the part above) -->
form part of the region. If this member is not provided or is set
to null, the <span>current default path</span> is used
instead.</dd>

<!--
<dt><code title="dom-HitRegionOptions-transform">transform</code> (default null)

<dd>An <code>SVGMatrix</code> object that describes a
transformation to apply to the path described by the <code
title="dom-HitRegionOptions-path">path</code> member.</dd>

-->
<dt><code title="dom-HitRegionOptions-id">id</code> (default empty string)

<dd>The ID to use for this region. This is used in
Expand Down Expand Up @@ -44985,7 +44985,7 @@ v6DVT (also check for '- -' bits in the part above) -->
title="dom-HitRegionOptions-path">path</code> member's value.
Otherwise, let it be the <code>CanvasRenderingContext2D</code>
object's <span>current default path</span>.</p></li>

<!--
<li><p>If the <var title="">arguments</var> object's <code
title="dom-HitRegionOptions-path">path</code> member is null, but
the <code title="dom-HitRegionOptions-transform">transform</code>
Expand All @@ -44997,6 +44997,12 @@ v6DVT (also check for '- -' bits in the part above) -->
<var title="">arguments</var> object's <code
title="dom-HitRegionOptions-transform">transform</code> member, if
it is not null.</p></li>
-->
<li><p>Transform all the coordinates and lines in <var
title="">source path</var> by the current transform matrix, if the
<var title="">arguments</var> object's <code
title="dom-HitRegionOptions-path">path</code> member is not
null.</p></li>

<li><p>If the <var title="">arguments</var> object's <code
title="dom-HitRegionOptions-id">id</code> member is the
Expand Down Expand Up @@ -45037,12 +45043,12 @@ v6DVT (also check for '- -' bits in the part above) -->
steps.</p>

<ul class="brief">

<!--
<li>The <var title="">arguments</var> object's <code
title="dom-HitRegionOptions-path">path</code> member is null, but
its <code title="dom-HitRegionOptions-transform">transform</code>
member is not.</li>

-->
<li>The <var title="">arguments</var> object's <code
title="dom-HitRegionOptions-control">control</code> and <code
title="dom-HitRegionOptions-label">label</code> members are both
Expand Down

0 comments on commit f62e2ad

Please sign in to comment.