the canvas and ctx objects should be cached, not created each time this method is called