javascript canvas
#this code creates a circle within a canvas that must be created in HTML
var c = document.getElementById("myCanvas");
var ctx = c.getContext("2d");
ctx.beginPath();
ctx.arc(95, 50, 40, 0, 2 * Math.PI);
ctx.stroke();
javascript canvas
#this code creates a circle within a canvas that must be created in HTML
var c = document.getElementById("myCanvas");
var ctx = c.getContext("2d");
ctx.beginPath();
ctx.arc(95, 50, 40, 0, 2 * Math.PI);
ctx.stroke();
js draw canvas on canvas
<canvas id="canvas-1"></canvas>
<canvas id="canvas-2"></canvas>
<script>
const canvas1 = document.getElementById("canvas-1");
const canvas2 = document.getElementById("canvas-2");
const ctx1 = canvas1.getContext("2d");
const ctx2 = canvas2.getContext("2d");
ctx1.fillStyle = "red";
ctx1.fillRect(10, 10, canvas1.width - 20, canvas.height - 20);
ctx2.drawImage(canvas1, 0, 0);
</script>
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us