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

Chapter 2. Drawing > 2.2. The Drawing Model

2.2. The Drawing Model

At some point when you’re using Canvas, you will need to have a good understanding of exactly how Canvas draws shapes, images, and text, which in turn requires an understanding of shadows, alpha channels, the clipping region, and compositing; indeed, by the end of this chapter you will have a good grasp of all of those things. Right now, you don’t need to understand any of them, so feel free to skip this section on first reading and use it as a reference later on.

When you draw shapes or images into a canvas, the browser does the following:

1. Draws the shape or image into an infinite, transparent bitmap, honoring the current fill, stroke, and line styles

2. Draws the shadow from the shape or image into a second bitmap, using the current context shadow settings


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

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

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint