rect method
Traces the outline of rect as a closed subpath, starting at its
top-left corner.
Implementation
void rect(Rect rect) {
moveTo(rect.left, rect.top);
lineTo(rect.right, rect.top);
lineTo(rect.right, rect.bottom);
lineTo(rect.left, rect.bottom);
close();
}