This example shows how to paint in a canvas, with a "pencil"... The path that is drawn is made of several contiguous lines. Each line is drawn in "immediate" mode. There is no animation loop in there as we must not clear the canvas like in an animation loop. We draw only when the mouse moved.