O'Reilly logo

HTML5 Web Application Development By Example Beginner's guide by J.M. Gustafson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Summary

In this chapter, we created a drawing application called canvas pad which can be used to make simple drawings. Along the way we learned how to use the HTML5 canvas element and API. We also learned how to implement a reusable toolbar with menu items that are bound to actions using custom data attributes. We now have a reusable toolbar we can use in other applications.

We covered the following concepts in this chapter:

  • How to use the <canvas> element and the canvas API
  • How to get a canvas context and change global drawing properties such as width, color, and opacity
  • How to use paths to draw free lines and shapes
  • How to draw lines, rectangles, and circles
  • How to get the position of the mouse inside a canvas element
  • How to create a reusable toolbar ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required