Expression painter:rectangle(x,y,w,h) appends a rectangle to the current path. The rectangle starts is defined by its origin (x,y), its width w and its height h.
painter:rectangle(x,y,w,h)
(x,y)
w
h
After calling this function, the current point is left unset.