Add dtype parameter to rectangle creation.

Defaults to None for autodetect.