+ 4
How to draw in canvas
I don't understand how to draw in canvas and I keep learning it time to time and I need to learn it so bad can someone please explain it to me how it works
10 Respostas
+ 6
The HTML <canvas> element is used to draw graphics, on the fly, via scripting (usually JavaScript).
The <canvas> element is only a container for graphics. You must use a script to actually draw the graphics.
Canvas has several methods for drawing paths, boxes, circles, text, and adding images.
Learn more here: https://www.w3schools.com/graphics/canvas_intro.asp
+ 5
It can be really helpful
https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API
+ 3
Thanks
+ 2
https://www.sololearn.com/learn/HTML/2201/?ref=app
+ 2
Thank you Abhay
+ 2
I want to use it to draw my game I am building
+ 2
Thanks wow it worked
+ 1
Rasheed Galeeb Canvas is something like painting app ,anything you draw is literally painting of pixels and it doesn't remembers at all the previous states ,if you have to move object you need to clear previous pixels and paint new pixels at different coordinates ,it does provides methods to ease common tasks and manipulating videos and images ,
You can use mdn docs to learn in more detail about the canvas api ,
https://www.google.com/url?sa=t&source=web&rct=j&url=https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API&ved=2ahUKEwjhj9fdu8rsAhVtyjgGHffvBuwQFjAAegQIARAB&usg=AOvVaw1rj1bnlTH9dXzazYommbi7
+ 1
It will be difficult to do even common task using canvas, surely you will be able to make one if you are determined to do so ,good luck !