Reference drawingContext

drawingContext

A system variable that provides direct access to the sketch's <canvas></canvas> element.

The <canvas></canvas> element provides many specialized features that aren't included in the p5.js library. The drawingContext system variable provides access to these features by exposing the sketch's CanvasRenderingContext2D object.

Examples

Notice any errors or typos? Please let us know. Please feel free to edit src/core/rendering.js and open a pull request!

Related References