An API for drawing to a Canvas from Java Code