Factored out rect value creation.