void addRect(Rect rect)

Adds a new subpath that consists of four lines that outline the given rectangle.

Source

void addRect(Rect rect) {
  _addRect(rect.left, rect.top, rect.right, rect.bottom);
}