Skip to content

Commit

Permalink
Fixed editorial issues
Browse files Browse the repository at this point in the history
  • Loading branch information
graveljp committed Nov 9, 2023
1 parent 6f28c4d commit fd385d3
Showing 1 changed file with 31 additions and 31 deletions.
62 changes: 31 additions & 31 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -64151,7 +64151,7 @@ typedef record&lt;DOMString, any> <dfn typedef>CanvasFilterPrimitive</dfn>;
typedef (DOMString or <span>CanvasFilterPrimitive</span> or sequence&lt;<span>CanvasFilterPrimitive</span>>) <dfn typedef>CanvasFilterInput</dfn>;

dictionary <dfn dictionary>BeginLayerOptions</dfn> {
<span>CanvasFilterInput</span>? <dfn data-x="dom-context-2d-beginLayer-options-filter">filter</dfn> = null;
<span>CanvasFilterInput</span>? <dfn data-x="dom-context-2d-beginLayer-options-filter">filter</dfn>;
};

interface mixin <dfn interface>CanvasLayers</dfn> {
Expand Down Expand Up @@ -64451,19 +64451,19 @@ interface <dfn interface>Path2D</dfn> {
<span>top level output bitmap</span> is the bitmap that gets <dfn
data-x="concept-canvas-presented">presented to the user</dfn> in the <span>update the
rendering</span> step of the <span>event loop</span>. The <span>current output bitmap</span> is
the bitmap to which most <span>CanvasRenderingContext2D</span> operations are drawing.</p>
the bitmap to which most <code>CanvasRenderingContext2D</code> operations are drawing.</p>

<p>The <code>CanvasRenderingContext2D</code>'s <span>current output bitmap</span> can be replaced
and restored by calls to <code data-x="dom-context-2d-beginLayer">beginLayer</code> and <code
data-x="dom-context-2d-endLayer">endLayer</code>, with the <span>drawing state stack</span>
and restored by calls to <code data-x="dom-context-2d-beginLayer">beginLayer()</code> and <code
data-x="dom-context-2d-endLayer">endLayer()</code>, with the <span>drawing state stack</span>
keeping track of all active nested <span data-x="output bitmap">output bitmaps</span>. The
<code>CanvasRenderingContext2D</code> object has a <dfn
data-x="concept-canvas-layer-count">layer count</dfn> integer that is initially set to zero,
keeping track of the number of opened nested layers.</p>

<p>The <span>output bitmap</span> objects have an <span
data-x="concept-canvas-origin-clean">origin-clean</span> flag, which can be set to true or false.
Initially, when one of these bitmaps are created, their <span
Initially, when these bitmaps are created, their <span
data-x="concept-canvas-origin-clean">origin-clean</span> flag must be set to true.</p>

<p>The <code>CanvasRenderingContext2D</code> object also has an <dfn
Expand All @@ -64478,8 +64478,8 @@ interface <dfn interface>Path2D</dfn> {
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, images and layers
drawn onto the canvas are still honoured up to the point where they would impact the <span>top
fourth byte in its input, and so on. However, the alpha component of styles, images, and layers
drawn onto the canvas are still honored up to the point where they would impact the <span>top
level output bitmap</span>'s alpha channel; for instance, drawing a 50% transparent white square
on a freshly created <span>top level output bitmap</span> with its <span
data-x="concept-canvas-alpha">alpha</span> set to false will result in a fully-opaque gray
Expand Down Expand Up @@ -64857,18 +64857,18 @@ context.fillRect(100,0,50,50); // only this square remains</code></pre>
<p>To <dfn>reset the rendering context to its default state</dfn>:</p>

<ol>
<li><p>Clear <span>this</span>'s <span>drawing state stack</span>.</p></li>
<li><p>Clear <span>this</span>'s <span>drawing state stack</span>.</p></li>

<li><p>Set <span>this</span>'s <span>current output bitmap</span> to be a reference to
<span>this</span>'s <span>top level output bitmap</span>.</p></li>
<li><p>Set <span>this</span>'s <span>current output bitmap</span> to be a reference to
<span>this</span>'s <span>top level output bitmap</span>.</p></li>

<li><p>Set <span>this</span>'s <span>top level output bitmap</span>'s <span
data-x="concept-canvas-origin-clean">origin-clean</span> flag to true.</p></li>
<li><p>Set <span>this</span>'s <span>top level output bitmap</span>'s <span
data-x="concept-canvas-origin-clean">origin-clean</span> flag to true.</p></li>

<li><p>Set <span>this</span>'s <span data-x="concept-canvas-layer-count">layer count</span> to
zero.</p></li>
<li><p>Set <span>this</span>'s <span data-x="concept-canvas-layer-count">layer count</span> to
zero.</p></li>

<li><p>Clear canvas's bitmap to <span>transparent black</span>.</p></li>
<li><p>Clear canvas's bitmap to <span>transparent black</span>.</p></li>

<li><p>Empty the list of subpaths in context's <span>current default path</span>.</p></li>

Expand All @@ -64887,14 +64887,14 @@ context.fillRect(100,0,50,50); // only this square remains</code></pre>
<p>Objects that implement the <code>CanvasLayers</code> mixin have methods (defined in this
section) for managing a stack of <span data-x="output bitmap">output bitmaps</span>.</p>

<p>Layers are opened and closed using <code data-x="dom-context-2d-beginLayer">beginLayer</code>
and <code data-x="dom-context-2d-endLayer">endLayer</code>. When a layer is opened, the context's
<p>Layers are opened and closed using <code data-x="dom-context-2d-beginLayer">beginLayer()</code>
and <code data-x="dom-context-2d-endLayer">endLayer()</code>. When a layer is opened, the context's
<span>current output bitmap</span> is aliased to that layer's <span>output bitmap</span>, such
that all draw calls performed while the layer is active will effectively render onto the layer's
<span>output bitmap</span>. When <code data-x="dom-context-2d-endLayer">endLayer</code> is called,
the layer's <span>output bitmap</span> gets filtered using the <code
<span>output bitmap</span>. When <code data-x="dom-context-2d-endLayer">endLayer()</code> is
called, the layer's <span>output bitmap</span> gets filtered using the <code
data-x="dom-context-2d-beginLayer-options-filter">filter</code> specified in <code
data-x="dom-context-2d-beginLayer">beginLayer</code> and composited in the parent's
data-x="dom-context-2d-beginLayer">beginLayer()</code> and composited in the parent's
<span>output bitmap</span> using the <span>layer rendering states</span>.</p>

<div w-nodev>
Expand Down Expand Up @@ -64946,10 +64946,10 @@ context.fillRect(100,0,50,50); // only this square remains</code></pre>
<p>Filters specified via <code data-x="dom-context-2d-filter">context.filter</code> are not part
of the <span>layer rendering states</span> and are therefore not applied on the layer's
<span>output bitmap</span>. The preferred way to specify filters is to use <code
data-x="dom-context-2d-beginLayer">beginLayer</code>. Using <code
data-x="dom-context-2d-beginLayer">beginLayer()</code>. Using <code
data-x="dom-context-2d-filter">context.filter</code> is inefficient because it requires each
individual draw call to be wrapped in a layer. It's better to make this cost explicit by using
<code data-x="dom-context-2d-beginLayer">beginLayer</code>.</p>
<code data-x="dom-context-2d-beginLayer">beginLayer()</code>.</p>
</div>

<p><code>CanvasFilterInput</code> is used for describing CSS or SVG filters using JavaScript. A
Expand Down Expand Up @@ -64988,7 +64988,7 @@ context.fillRect(100,0,50,50); // only this square remains</code></pre>
resulting texture to the parent surface (the canvas or the parent layer). The layer's <code
data-x="dom-context-2d-beginLayer-options-filter">filter</code>, if specified, gets applied,
along with the global rendering states as they were when <code
data-x="dom-context-2d-beginLayer">beginLayer</code> was called.</p></dd>
data-x="dom-context-2d-beginLayer">beginLayer()</code> was called.</p></dd>
</dl>

<div w-nodev>
Expand All @@ -65013,8 +65013,8 @@ context.fillRect(100,0,50,50); // only this square remains</code></pre>
with <span>parent output bitmap</span> set to <var>currentOutputBitmap</var> and <span>resolved
layer filter</span> set to <var>resolvedLayerFilter</var>.</p></li>

<p>Push a copy of the current <span>drawing state</span> onto <span>this</span>'s
<span>drawing state stack</span>.</p>
<li><p>Push a copy of the current <span>drawing state</span> onto <span>this</span>'s
<span>drawing state stack</span>.</p></li>

<li><p>Reset <span>this</span>'s <span>layer rendering states</span> to their default
value.</p></li>
Expand All @@ -65023,7 +65023,7 @@ context.fillRect(100,0,50,50); // only this square remains</code></pre>
state</span> to <var>layerState</var>.</p></li>

<li><p>Set <span>this</span>'s <span>current output bitmap</span> to
<var>layerOutputBitmap</var></p></li>
<var>layerOutputBitmap</var>.</p></li>

<li><p>Increment <span>this</span>'s <span data-x="concept-canvas-layer-count">layer count</span>
by one.</p></li>
Expand All @@ -65043,18 +65043,18 @@ context.fillRect(100,0,50,50); // only this square remains</code></pre>
<code>DOMException</code>.</p></li>

<li><p>Let <var>layerOutputBitmap</var> be <span>this</span>'s <span>current output
bitmap</span></p></li>
bitmap</span>.</p></li>

<li><p>Let <var>parentOutputBitmap</var> be
<var>layerState</var>'s <span>parent output bitmap</span></p></li>
<var>layerState</var>'s <span>parent output bitmap</span>.</p></li>

<li><p>If <var>layerOutputBitmap</var> is marked as <span
data-x="concept-canvas-pattern-not-origin-clean">not origin-clean</span>, then set the <span
data-x="concept-canvas-origin-clean">origin-clean</span> flag of <var>parentOutputBitmap</var>
to false.</p></li>

<li><p>Set <span>this</span>'s <span>current output bitmap</span> to
<var>parentOutputBitmap</var></p></li>
<var>parentOutputBitmap</var>.</p></li>

<li><p>Let <var>filteredLayerOutputBitmap</var> be the result of running the <span>steps to apply
a resolved layer filter</span> to <var>layerOutputBitmap</var> given
Expand Down Expand Up @@ -65096,7 +65096,7 @@ context.fillRect(100,0,50,50); // only this square remains</code></pre>
<div w-nodev>

<p>A <dfn data-x="concept-canvas-resolved-filter">resolved filter</dfn> can either be the string
"<code data-x="">none</code>", a string parseable as a <span>&lt;filter-value-list&gt;</span> or
"<code data-x="">none</code>", a string parseable as a <span>&lt;filter-value-list&gt;</span>, or
an <span data-x="concept-canvas-xml-filter-list">XML filter list</span>.</p>

<p>The <dfn data-x="concept-canvas-resolving-layer-filter">steps for resolving a layer
Expand Down Expand Up @@ -65321,7 +65321,7 @@ context.fillRect(100,0,50,50); // only this square remains</code></pre>
</ol>
</li>

<li>return <var>xmlFilters</var></li>
<li>Return <var>xmlFilters</var>.</li>
</ol>

<p>The <dfn>steps to apply a resolved layer filter</dfn> to an <var>image</var> given a <span
Expand Down

0 comments on commit fd385d3

Please sign in to comment.