The Canvas API provides a means for drawing graphics via JavaScript and the HTML <canvas>
element. Among other things, it can be used for animation, game graphics, data visualization, photo manipulation, and real-time video processing.
The Canvas API largely focuses on 2D graphics. The WebGL API, which also uses the <canvas>
element, draws hardware-accelerated 2D and 3D graphics.
source:https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API
-----------------------------------------------------------------------------------------------------------------
LEt's understand about canvas in detail using following example.
--------------------------------------------------------------------------------------------------------
1)HTML with CANVAS to draw rectangle.
2)HTML with CANVAS to draw square.
3)HTML with canvas to draw straight line.
4)HTML with canvas to draw circle.
5)HTML with canvas to draw arc.
6)HTML with canvas to write text on canvas.
7) HTML with canvas to write text on canvas. with background color
8)HTML with canvas to fill entire canvas with color
No comments:
Post a Comment