drawing to a buffer'; moved drawing to pattern