          *DEPRECTATED* Calculate the bounding box of a region.

(xmin, ymin, xmax, ymax) = regExtent(reg)

The regExtent routine returns the bounding box of a region. It is primarily useful if you wish to use the six-argument form of regArea().

The region module is not available by default; see "ahelp region" for information on loading the module.

>>> from region import *
>>> reg = regParse("ellipse(10,10,4,3,24)-rect(4,2,7,8)")
>>> (x0,y0,x1,y1) = regExtent(reg)
>>> print("Bounding box is ({0:.1f},{1:.1f}) to ({2:.1f},{3:.1f})".format(x0,y0,x1,y1))
Bounding box is (5.1,5.6) to (14.9,14.4)
>>> print(regArea(reg))
35.0
>>> regArea(reg, 5.1, 5.6, 14.9, 14.1, 1)
35.0
>>> regArea(reg, 5.1, 5.6, 14.9, 14.1, 0.1)
37.700000000000003

See the bugs page for the region library on the CIAO website for an up-to-date listing of known bugs.

February 2018