Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[gow] (2) Disable shadows when they're at their default values.
git-svn-id: http://svn.whatwg.org/webapps@3023 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Apr 29, 2009
1 parent 7bd9dcd commit 2c58eec
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 18 deletions.
25 changes: 17 additions & 8 deletions index
Expand Up @@ -23448,7 +23448,15 @@ notes on what would need to be defined for dashed lines:
value is negative, infinite or NaN, in which case the new value must
be ignored.</p>

<p>When shadows are drawn, they must be rendered as follows:</p>
<p><dfn id=when-shadows-are-drawn title="when shadows are drawn">Shadows are only drawn
if</dfn> either the opacity component of the alpha component of the
color of <code title=dom-context-2d-shadowColor><a href=#dom-context-2d-shadowcolor>shadowColor</a></code>
is non-zero, or the <code title=dom-context-2d-shadowBlur><a href=#dom-context-2d-shadowblur>shadowBlur</a></code> is non-zero, or
the <code title=dom-context-2d-shadowOffsetX><a href=#dom-context-2d-shadowoffsetx>shadowOffsetX</a></code>
is non-zero, or the <code title=dom-context-2d-shadowOffsetY><a href=#dom-context-2d-shadowoffsety>shadowOffsetY</a></code> is
non-zero.</p>

<p><a href=#when-shadows-are-drawn>When shadows are drawn</a>, they must be rendered as follows:</p>

<ol><li> <p>Let <var title="">A</var> be the source image for which a
shadow is being created.</p> </li>
Expand Down Expand Up @@ -24857,18 +24865,19 @@ function AddCloud(data, x, y) { ... }</pre>
and the stroke must itself also be subjected to the current
transformation matrix.</li>

<li><p>Render the shadow from image <var title="">A</var>, using
the current shadow styles, creating image <var title="">B</var>.</li>
<li><p><a href=#when-shadows-are-drawn>When shadows are drawn</a>, render the shadow from
image <var title="">A</var>, using the current shadow styles,
creating image <var title="">B</var>.</li>

<li><p>Multiply the alpha component of every pixel in <var title="">B</var> by <code title=dom-context-2d-globalAlpha><a href=#dom-context-2d-globalalpha>globalAlpha</a></code>.</li>
<li><p><a href=#when-shadows-are-drawn>When shadows are drawn</a>, multiply the alpha
component of every pixel in <var title="">B</var> by <code title=dom-context-2d-globalAlpha><a href=#dom-context-2d-globalalpha>globalAlpha</a></code>.</li>

<li><p>Within the clipping region, composite <var title="">B</var>
over the current canvas bitmap using the current composition
operator.</li>
<li><p><a href=#when-shadows-are-drawn>When shadows are drawn</a>, composite <var title="">B</var> within the clipping region over the current canvas
bitmap using the current composition operator.</li>

<li><p>Multiply the alpha component of every pixel in <var title="">A</var> by <code title=dom-context-2d-globalAlpha><a href=#dom-context-2d-globalalpha>globalAlpha</a></code>.</li>

<li><p>Within the clipping region, composite <var title="">A</var>
<li><p>Composite <var title="">A</var> within the clipping region
over the current canvas bitmap using the current composition
operator.</li>

Expand Down
30 changes: 20 additions & 10 deletions source
Expand Up @@ -25662,7 +25662,17 @@ notes on what would need to be defined for dashed lines:
value is negative, infinite or NaN, in which case the new value must
be ignored.</p>

<p>When shadows are drawn, they must be rendered as follows:</p>
<p><dfn title="when shadows are drawn">Shadows are only drawn
if</dfn> either the opacity component of the alpha component of the
color of <code title="dom-context-2d-shadowColor">shadowColor</code>
is non-zero, or the <code
title="dom-context-2d-shadowBlur">shadowBlur</code> is non-zero, or
the <code title="dom-context-2d-shadowOffsetX">shadowOffsetX</code>
is non-zero, or the <code
title="dom-context-2d-shadowOffsetY">shadowOffsetY</code> is
non-zero.</p>

<p><span>When shadows are drawn</span>, they must be rendered as follows:</p>

<ol>

Expand Down Expand Up @@ -27391,23 +27401,23 @@ function AddCloud(data, x, y) { ... }</pre>
and the stroke must itself also be subjected to the current
transformation matrix.</p></li>

<li><p>Render the shadow from image <var title="">A</var>, using
the current shadow styles, creating image <var
title="">B</var>.</p></li>
<li><p><span>When shadows are drawn</span>, render the shadow from
image <var title="">A</var>, using the current shadow styles,
creating image <var title="">B</var>.</p></li>

<li><p>Multiply the alpha component of every pixel in <var
title="">B</var> by <code
<li><p><span>When shadows are drawn</span>, multiply the alpha
component of every pixel in <var title="">B</var> by <code
title="dom-context-2d-globalAlpha">globalAlpha</code>.</p></li>

<li><p>Within the clipping region, composite <var title="">B</var>
over the current canvas bitmap using the current composition
operator.</p></li>
<li><p><span>When shadows are drawn</span>, composite <var
title="">B</var> within the clipping region over the current canvas
bitmap using the current composition operator.</p></li>

<li><p>Multiply the alpha component of every pixel in <var
title="">A</var> by <code
title="dom-context-2d-globalAlpha">globalAlpha</code>.</p></li>

<li><p>Within the clipping region, composite <var title="">A</var>
<li><p>Composite <var title="">A</var> within the clipping region
over the current canvas bitmap using the current composition
operator.</p></li>

Expand Down

0 comments on commit 2c58eec

Please sign in to comment.