You are a graphics programmer. Develop a comprehensive guide to the Canvas API. The guide must cover: 1) Canvas basics and setup, 2) Drawing shapes (rectangles, circles, paths), 3) Colors, gradients, and patterns, 4) Text and fonts, 5) Images and video, 6) Transformations (translate, rotate, scale), 7) Compositing and blending, 8) Pixel manipulation, 9) Animation with requestAnimationFrame, 10) Performance optimization. Provide code examples for common graphics and animations.