Skip to content

Commit

Permalink
[] (0) Make gradients transform at the right time.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.whatwg.org/webapps@1767 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jun 13, 2008
1 parent b31ca5b commit 6b520e8
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 20 deletions.
27 changes: 15 additions & 12 deletions index
Expand Up @@ -18846,13 +18846,10 @@ idea from Mihai:
<p>The <dfn id=createlineargradient
title=dom-context-2d-createLinearGradient><code>createLinearGradient(<var
title="">x0</var>, <var title="">y0</var>, <var title="">x1</var>, <var
title="">y1</var>)</code></dfn> method takes four arguments that, after
being subjected to the <a href="#transformations0"
title=dom-context-2d-transformation>current transformation matrix</a>,
represent the start point (<var title="">x0</var>, <var title="">y0</var>)
and end point (<var title="">x1</var>, <var title="">y1</var>) of the
gradient. If any of the arguments to <code
title=dom-context-2d-createLinearGradient><a
title="">y1</var>)</code></dfn> method takes four arguments that represent
the start point (<var title="">x0</var>, <var title="">y0</var>) and end
point (<var title="">x1</var>, <var title="">y1</var>) of the gradient. If
any of the arguments to <code title=dom-context-2d-createLinearGradient><a
href="#createlineargradient">createLinearGradient()</a></code> are
infinite or NaN, the method must raise a <code>NOT_SUPPORTED_ERR</code>
exception. Otherwise, the method must return a linear <code><a
Expand All @@ -18864,7 +18861,10 @@ idea from Mihai:
ending point the color at offset 1 is used, and that all points on a line
perpendicular to the line that crosses the start and end points have the
color at the point where those two lines cross (with the colors coming
from the interpolation described above).
from the interpolation described above). The points in the linear gradient
must be transformed as described by the <a href="#transformations0"
title=dom-context-2d-transformation>current transformation matrix</a> when
rendering.

<p>If <span><var title="">x<sub>0</sub></var>&nbsp;=&nbsp;<var
title="">x<sub>1</sub></var></span> and <span><var
Expand All @@ -18889,9 +18889,7 @@ idea from Mihai:
<code>INDEX_SIZE_ERR</code> exception must be raised. Otherwise, the
method must return a radial <code><a
href="#canvasgradient">CanvasGradient</a></code> initialized with the two
specified circles, after transforming them according to the <a
href="#transformations0" title=dom-context-2d-transformation>current
transformation matrix</a>.
specified circles.

<p>Radial gradients must be rendered by following these steps:

Expand Down Expand Up @@ -18954,7 +18952,12 @@ idea from Mihai:
and areas outside the cone untouched by the gradient (transparent black).

<p>Gradients must be painted only where the relevant stroking or filling
effects requires that they be drawn.</p>
effects requires that they be drawn.

<p>The points in the radial gradient must be transformed as described by
the <a href="#transformations0"
title=dom-context-2d-transformation>current transformation matrix</a> when
rendering.</p>
<!--
<p>Support for actually painting gradients is optional. Instead of
painting the gradients, user agents may instead just paint the first
Expand Down
18 changes: 10 additions & 8 deletions source
Expand Up @@ -16444,10 +16444,8 @@ idea from Mihai:
title="dom-context-2d-createLinearGradient"><code>createLinearGradient(<var
title="">x0</var>, <var title="">y0</var>, <var title="">x1</var>,
<var title="">y1</var>)</code></dfn> method takes four arguments
that, after being subjected to the <span
title="dom-context-2d-transformation">current transformation
matrix</span>, represent the start point (<var title="">x0</var>,
<var title="">y0</var>) and end point (<var title="">x1</var>, <var
that represent the start point (<var title="">x0</var>, <var
title="">y0</var>) and end point (<var title="">x1</var>, <var
title="">y1</var>) of the gradient. If any of the arguments to <code
title="dom-context-2d-createLinearGradient">createLinearGradient()</code>
are infinite or NaN, the method must raise a
Expand All @@ -16461,7 +16459,9 @@ idea from Mihai:
all points on a line perpendicular to the line that crosses the
start and end points have the color at the point where those two
lines cross (with the colors coming from the interpolation described
above).</p>
above). The points in the linear gradient must be transformed as
described by the <span title="dom-context-2d-transformation">current
transformation matrix</span> when rendering.</p>

<p>If <span><var title="">x<sub>0</sub></var>&nbsp;=&nbsp;<var
title="">x<sub>1</sub></var></span> and <span><var
Expand All @@ -16485,9 +16485,7 @@ idea from Mihai:
of <var title="">r0</var> or <var title="">r1</var> are negative, an
<code>INDEX_SIZE_ERR</code> exception must be raised. Otherwise,
the method must return a radial <code>CanvasGradient</code>
initialized with the two specified circles, after transforming them
according to the <span title="dom-context-2d-transformation">current
transformation matrix</span>.</p>
initialized with the two specified circles.</p>

<p>Radial gradients must be rendered by following these steps:</p>

Expand Down Expand Up @@ -16558,6 +16556,10 @@ idea from Mihai:
<p>Gradients must be painted only where the relevant stroking or
filling effects requires that they be drawn.</p>

<p>The points in the radial gradient must be transformed as
described by the <span title="dom-context-2d-transformation">current
transformation matrix</span> when rendering.</p>

<!--
<p>Support for actually painting gradients is optional. Instead of
painting the gradients, user agents may instead just paint the first
Expand Down

0 comments on commit 6b520e8

Please sign in to comment.