Skip to content

Commit

Permalink
Use opaque and transparent black as defined in CSS Color
Browse files Browse the repository at this point in the history
  • Loading branch information
annevk committed Jan 18, 2018
1 parent 0b37b53 commit c26b156
Showing 1 changed file with 16 additions and 18 deletions.
34 changes: 16 additions & 18 deletions source
Expand Up @@ -1876,10 +1876,6 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
rendered to the user. These terms are not meant to imply a visual medium; they must be considered
to apply to other media in equivalent ways.</p>

<!-- should find somewhere more appropriate to put this -->
<p><dfn>Transparent black</dfn> refers to the color with red, green, blue, and alpha channels all
set to zero.</p>


<div w-nodev>

Expand Down Expand Up @@ -3445,8 +3441,8 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
<p>If <var>color</var> is <code>currentColor</code>, then:</p>

<ol>
<li><p>If <var>element</var> is not given, then set <var>color</var> to fully opaque
black.</p></li>
<li><p>If <var>element</var> is not given, then set <var>color</var> to <span>opaque
black</span>.</p></li>

<li><p>Otherwise, set <var>color</var> to the computed value of the <span>'color'</span>
property of <var>element</var>.</p></li>
Expand Down Expand Up @@ -3559,6 +3555,8 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
<li><dfn data-x-href="https://drafts.csswg.org/css-color/#typedef-color">&lt;color></dfn></li>
<li><dfn data-x-href="https://drafts.csswg.org/css-color/#valdef-color-currentcolor">currentColor</dfn></li>
<li>The <dfn data-x-href="https://drafts.csswg.org/css-color/#the-color-property">'color'</dfn> property</li>
<li><dfn data-x-href="https://drafts.csswg.org/css-color/#opaque-black">opaque black</dfn></li>
<li><dfn data-x-href="https://drafts.csswg.org/css-color/#transparent-black">transparent black</dfn></li>
</ul>

<p>The term <dfn data-x-href="https://drafts.csswg.org/css-images-4/#paint-source">paint
Expand Down Expand Up @@ -59915,9 +59913,9 @@ interface <dfn>Path2D</dfn> {
fixed to 1.0 (fully opaque) for all pixels, and attempts to change the alpha component of any
pixel must be silently ignored.</p>

<p class="note">Thus, the bitmap of such a context starts off as fully-opaque black instead of
<span>transparent black</span>; <code data-x="dom-context-2d-clearRect">clearRect()</code> always
results in fully-opaque black pixels, every fourth byte from <code
<p class="note">Thus, the bitmap of such a context starts off as <span>opaque black</span> instead
of <span>transparent black</span>; <code data-x="dom-context-2d-clearRect">clearRect()</code>
always results in <span>opaque black</span> pixels, every fourth byte from <code
data-x="dom-context-2d-getImageData">getImageData()</code> is always 255, the <code
data-x="dom-context-2d-putImageData">putImageData()</code> method effectively ignores every
fourth byte in its input, and so on. However, the alpha component of styles and images drawn
Expand Down Expand Up @@ -64824,15 +64822,15 @@ dictionary <dfn>ImageBitmapRenderingContextSettings</dfn> {
data-x="concept-ImageBitmapRenderingContext-alpha">alpha</span> flag set to false, the contents
of the <code>canvas</code> element to which the context is bound are obtained by
compositing the context's <span
data-x="concept-ImageBitmapRenderingContext-output-bitmap">output bitmap</span> onto an opaque
black bitmap of the same size using the source-over composite operation. If the <span
data-x="concept-ImageBitmapRenderingContext-alpha">alpha</span> flag is set to true, then the
<span data-x="concept-ImageBitmapRenderingContext-output-bitmap">output bitmap</span> is used
as the contents of the <code>canvas</code> element to which the context is bound. <ref
data-x="concept-ImageBitmapRenderingContext-output-bitmap">output bitmap</span> onto an
<span>opaque black</span> bitmap of the same size using the source-over composite operation. If
the <span data-x="concept-ImageBitmapRenderingContext-alpha">alpha</span> flag is set to true,
then the <span data-x="concept-ImageBitmapRenderingContext-output-bitmap">output bitmap</span> is
used as the contents of the <code>canvas</code> element to which the context is bound. <ref
spec=COMPOSITE></p>

<p class="note">The step of compositing over an opaque black bitmap ought to be elided whenever
equivalent results can be obtained more efficiently by other means.</p>
<p class="note">The step of compositing over an <span>opaque black</span> bitmap ought to be
elided whenever equivalent results can be obtained more efficiently by other means.</p>

<hr>

Expand Down Expand Up @@ -65345,7 +65343,7 @@ interface <dfn>OffscreenCanvas</dfn> : <span>EventTarget</span> {
<li><p>Set this <code>OffscreenCanvas</code> object's <span
data-x="offscreencanvas-bitmap">bitmap</span> to reference a newly created bitmap of the same
dimensions as the previous bitmap, and with its pixels initialized to <span>transparent
black</span>, or opaque black if the rendering context's <span
black</span>, or <span>opaque black</span> if the rendering context's <span
data-x="offscreencontext2d-alpha">alpha</span> flag is set to false.</p></li>

<li><p>Return <var>image</var>.</p></li>
Expand Down Expand Up @@ -65469,7 +65467,7 @@ interface <dfn>OffscreenCanvasRenderingContext2D</dfn> {
<li><p>If <var>context</var>'s <span data-x="offscreencontext2d-alpha">alpha</span> flag is set
to true, initialize all the pixels of <var>context</var>'s <span
data-x="offscreencontext2d-bitmap">bitmap</span> to <span>transparent black</span>. Otherwise,
initialize the pixels to opaque black.</p></li>
initialize the pixels to <span>opaque black</span>.</p></li>

<li><p>Return <var>context</var>.</p></li>

Expand Down

0 comments on commit c26b156

Please sign in to comment.