Working with composite operations
In this recipe, we'll explore composite operations by creating a table of each variation. Composite operations are particularly useful for creating complex shapes, drawing shapes underneath other shapes instead of on top of them, and creating other interesting effects.
Getting ready...
The following is a description for each possible composite operation available with the HTML5 canvas API, where the red circle represents the source (S) and the blue square represents the destination (D). To further develop your understanding of composite operations, it helps to look at the corresponding operation while reading each ...
Get HTML5 Canvas Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.