Implemented rectangle creation.