aboutsummaryrefslogtreecommitdiff
path: root/files/ru/web/api/canvasrenderingcontext2d/getimagedata
diff options
context:
space:
mode:
Diffstat (limited to 'files/ru/web/api/canvasrenderingcontext2d/getimagedata')
-rw-r--r--files/ru/web/api/canvasrenderingcontext2d/getimagedata/index.html6
1 files changed, 3 insertions, 3 deletions
diff --git a/files/ru/web/api/canvasrenderingcontext2d/getimagedata/index.html b/files/ru/web/api/canvasrenderingcontext2d/getimagedata/index.html
index 08fffcc737..963d67e340 100644
--- a/files/ru/web/api/canvasrenderingcontext2d/getimagedata/index.html
+++ b/files/ru/web/api/canvasrenderingcontext2d/getimagedata/index.html
@@ -52,19 +52,19 @@ translation_of: Web/API/CanvasRenderingContext2D/getImageData
<h4 id="HTML">HTML</h4>
-<pre><code>&lt;canvas id="canvas"&gt;&lt;/canvas&gt;</code></pre>
+<pre class="brush: html">&lt;canvas id="canvas"&gt;&lt;/canvas&gt;</pre>
<h4 id="JavaScript">JavaScript</h4>
<p>The object retrieved by <code>getImageData()</code> has a width of 200 and a height of 100, for a total of 20,000 pixels. Of those pixels, most are either transparent or taken from off the canvas; only 5,000 of them are opaque black (the color of the drawn rectangle).</p>
-<pre><code>const canvas = document.getElementById('canvas');
+<pre class="brush: html">const canvas = document.getElementById('canvas');
const ctx = canvas.getContext('2d');
ctx.rect(10, 10, 100, 100);
ctx.fill();
let imageData = ctx.getImageData(60, 60, 200, 100);
-ctx.putImageData(imageData, 150, 10);</code></pre>
+ctx.putImageData(imageData, 150, 10);</pre>
<h4 id="Result">Result</h4>