Lesson

Draw with Your Mouse on an HTML Canvas

The canvas element exposes a 2d context which allows you to draw lines using the moveTo, lineTo, and stroke api. You can combine this with Mouse events to make a simple drawing app.

Duration
5 min
Access
Free
Transcript
Available

The canvas element exposes a 2d context which allows you to draw lines using the moveTo, lineTo, and stroke api. You can combine this with Mouse events to make a simple drawing app.