Skip to the navigation links
Last modified: December 2009

URL: http://cxc-newtest.cfa.harvard.edu/ciao4.2/regextent.html
AHELP for CIAO 4.2

regExtent

Context: region

Synopsis

Calculate the bounding box of a region.

Syntax

(xmin, ymin, xmax, ymax) = regExtent( Region_Type Region )

where xmin, ymin, xmax, and ymax are all Double_Type

Description

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; to use it in a S-Lang program, it must be loaded using the S-Lang require() function:

  require("region");

Example

slsh> require("region");
slsh> reg = regParse("circle(10,10,4)-rect(4,2,5,4)");
slsh> (x0,y0,x1,y1) = regExtent( reg );
slsh> vmessage( "Bounding box is (%.1f,%.1f) to (%.1f,%.1f)", x0, y0,
x1, y1 );
Bounding box is (6.0,6.0) to (14.0,14.0)

Bugs

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

See Also

modules
region
region
regarea, regextent, reginsideregion, regparse, regprintregion, regregionstring

Last modified: December 2009