HTML and CSS Reference
In-Depth Information
Chapter 2. Drawing on the Canvas
Using HTML5 Canvas effectively requires a strong foundation in drawing, coloring, and
transformingbasictwo-dimensionalshapes.Whiletheselectionofbuilt-inshapesisrelatively
limited, we can draw any shape we desire by using a series of line segments called paths ,
which we will discuss in the upcoming section Using Paths to Create Lines .
NOTE
The HTML5 Canvas API is well covered in many online forms. The W3C site has an exhaustive and
constantly updated reference that details the features of the Canvas 2D Drawing API.
However,thisonlinereferencelacksconcreteexamplesonusingtheAPI.Ratherthansimplyreprint-
ingthisentirespecification,wewillspendourtimecreatingexamplestoexplainandexploreasmany
features as we have space to cover.
Search WWH ::




Custom Search