- HTML5 Canvas Cookbook
- Eric Rowell
- 81字
- 2021-08-27 12:08:05
Chapter 2. Shape Drawing and Composites
In this chapter, we will cover:
- Drawing a rectangle
- Drawing a circle
- Working with custom shapes and fill styles
- Fun with Bezier curves: drawing a cloud
- Drawing transparent shapes
- Working with the context state stack to save and restore styles
- Working with composite operations
- Creating patterns with loops: drawing a gear
- Randomizing shape properties: drawing a field of flowers
- Creating custom shape functions: playing card suits
- Putting it all together: drawing a jet