Implements rect.