Creating a rectangle from region.