* Add a rectangle to the current path.
(x: number, y: number, width: number, height: number)
| 210 | * Add a rectangle to the current path. |
| 211 | */ |
| 212 | rectangle(x: number, y: number, width: number, height: number): this { |
| 213 | // Use fluent methods to ensure current point is tracked |
| 214 | return this.moveTo(x, y) |
| 215 | .lineTo(x + width, y) |
| 216 | .lineTo(x + width, y + height) |
| 217 | .lineTo(x, y + height) |
| 218 | .close(); |
| 219 | } |
| 220 | |
| 221 | /** |
| 222 | * Add a circle to the current path. |