Fix from James H: the shared code between drawing and printing