change: canvas object is not sent anymore to the paint mechanism.
instead, the context and a rectangle is sent.