diff options
author | Alexey Pyltsyn <lex61rus@gmail.com> | 2021-10-27 13:49:02 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-27 13:49:02 +0300 |
commit | a68152ef9cd653f92705683592d4652b617ab02c (patch) | |
tree | 7c146e854366c2f99c945c139e357279a03170b5 /files/ru/web/api/canvasrenderingcontext2d/getimagedata | |
parent | d994a7ce54ab29f67b13e49f5eca0930b0803b56 (diff) | |
download | translated-content-a68152ef9cd653f92705683592d4652b617ab02c.tar.gz translated-content-a68152ef9cd653f92705683592d4652b617ab02c.tar.bz2 translated-content-a68152ef9cd653f92705683592d4652b617ab02c.zip |
[RU] Fix another live samples (#2879)
Diffstat (limited to 'files/ru/web/api/canvasrenderingcontext2d/getimagedata')
-rw-r--r-- | files/ru/web/api/canvasrenderingcontext2d/getimagedata/index.html | 6 |
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><canvas id="canvas"></canvas></code></pre> +<pre class="brush: html"><canvas id="canvas"></canvas></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> |