HTML and CSS Reference
In-Depth Information
Step 2: Adjust how the frame and video combine on the Canvas
By default, things you draw on the Canvas layer on top of each other; each new drawing
replaces the pixels below it. But it's possible to make this layering work differently with
the .globalCompositeOperation property of the context.
Figure 8.9 provides an example of each composition mode available to you.
Figure 8.9. Canvas composition modes. The code used to generate this figure is in the source code download in a
file called canvas-compositionmodes.html.
 
Search WWH ::




Custom Search