Add rect method.