rect.moveAndExpand(r)

Offset the rectangle by r.x and r.y and expand it by r.width and r.height.