diff options
Diffstat (limited to 'files/ru/web/api/canvasrenderingcontext2d/linejoin/index.html')
-rw-r--r-- | files/ru/web/api/canvasrenderingcontext2d/linejoin/index.html | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/files/ru/web/api/canvasrenderingcontext2d/linejoin/index.html b/files/ru/web/api/canvasrenderingcontext2d/linejoin/index.html index 12b18c913c..428f7905a1 100644 --- a/files/ru/web/api/canvasrenderingcontext2d/linejoin/index.html +++ b/files/ru/web/api/canvasrenderingcontext2d/linejoin/index.html @@ -46,11 +46,11 @@ translation_of: Web/API/CanvasRenderingContext2D/lineJoin <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> -<pre><code>const canvas = document.getElementById('canvas'); +<pre class="brush: html">const canvas = document.getElementById('canvas'); const ctx = canvas.getContext('2d'); ctx.lineWidth = 20; @@ -60,7 +60,7 @@ ctx.moveTo(20, 20); ctx.lineTo(190, 100); ctx.lineTo(280, 20); ctx.lineTo(280, 150); -ctx.stroke();</code></pre> +ctx.stroke();</pre> <h4 id="Result">Result</h4> @@ -75,10 +75,10 @@ ctx.stroke();</code></pre> <p> </p> <div class="hidden"> -<pre><code><canvas id="canvas" width="150" height="150"></canvas></code></pre> +<pre class="brush: html"><canvas id="canvas" width="150" height="150"></canvas></pre> </div> -<pre><code>var ctx = document.getElementById('canvas').getContext('2d'); +<pre class="brush: html">var ctx = document.getElementById('canvas').getContext('2d'); var lineJoin = ['round', 'bevel', 'miter']; ctx.lineWidth = 10; @@ -91,7 +91,7 @@ for (let i = 0; i < lineJoin.length; i++) { ctx.lineTo(115, 45 + i * 40); ctx.lineTo(155, 5 + i * 40); ctx.stroke(); -}</code></pre> +}</pre> <p>{{EmbedLiveSample("Разница_между_значениями_lineJoin", "180", "180", "https://mdn.mozillademos.org/files/237/Canvas_linejoin.png")}}</p> |