Repaint canvas on resize.