a more stable redraw loop., that sets up the drawing canvas in loop