Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Contents

Contents

Preface

Acknowledgments

About the Author

Chapter 1: Essentials

1.1 The canvas Element

1.1.1 Canvas Element Size vs. Drawing Surface Size

1.1.2 The Canvas API

1.2 Canvas Contexts

1.2.1 The 2d Context

1.2.1.1 The WebGL 3d Context

1.2.2 Saving and Restoring Canvas State

1.3 Canonical Examples in This Book

1.4 Getting Started

1.4.1 Specifications

1.4.2 Browsers

1.4.3 Consoles and Debuggers

1.4.4 Performance

1.4.4.1 Profiles and Timelines

1.4.4.2 jsPerf

1.5 Fundamental Drawing Operations

1.6 Event Handling

1.6.1 Mouse Events

1.6.1.1 Translating Mouse Coordinates to Canvas Coordinates

1.6.2 Keyboard Events

1.6.3 Touch Events

1.7 Saving and Restoring the Drawing Surface

1.8 Using HTML Elements in a Canvas

1.8.1 Invisible HTML Elements

1.9 Printing a Canvas

1.10 Offscreen Canvases


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial