commented regarding adding image to canvas
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
canvas.height = 300;
|
||||
canvas.width = 300;
|
||||
let ctx = canvas.getContext("2d");
|
||||
let myImage = document.getElementById("flower");
|
||||
let myImage = document.getElementById("flower"); //This line adds the image on the canvas, you can hide the <img> tag by " style="display: none;" "
|
||||
ctx.drawImage(myImage, 10, 10);
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user