Added a new paintContext event handler which includes a GraphicsContext argument.