O'Reilly logo

Core HTML5 Canvas: Graphics, Animation, and Game Development by David Geary

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

Chapter 10. Custom Controls

Throughout this book you’ve seen how to implement Canvas-based applications with one or more canvas elements combined with standard HTML controls, such as text inputs and buttons. Standard HTML controls are sufficient for many Canvas-based applications; however, some applications require custom controls, typically because either the controls are not available as standard HTML controls or the control is not supported by all browsers. Another reason to implement your own controls is when you require the same look-and-feel across HTML5-capable browsers.

In this chapter we discuss four controls, implemented from scratch:

• Rounded rectangle

• Progress bar

• Slider

• Image panner

The controls implemented in this chapter ...

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