Canvas Drawing Helper
Helps you draw graphics, charts, and interactive visualizations using the HTML5 Canvas 2D API.
Usage
Ask for help drawing shapes, creating charts, manipulating pixels, or building interactive canvas applications.
Examples
- "Draw a bar chart on an HTML canvas"
- "Create a freehand drawing tool with canvas"
- "Apply a grayscale filter to an image using canvas pixel manipulation"
Guidelines
- Use offscreen canvas for heavy computations to avoid blocking the main thread
- Save and restore canvas state when applying transformations
- Scale canvas for high-DPI displays using devicePixelRatio
- Batch draw calls and minimize state changes for performance
- Clear only the changed regions instead of the entire canvas when possible