function Extent = extent(Constr)
%EXTENT  Returns bounding rectangle [Xmin Xmax Ymin Ymax]

%   Copyright 1986-2004 The MathWorks, Inc. 
%   $Revision: 1.1.6.1 $  $Date: 2004/12/10 19:32:06 $

Extent = [min(Constr.xCoords(:)) max(Constr.xCoords(:)) , ...
   min(Constr.yCoords(:)) max(Constr.yCoords(:))];
%Perform any necessary unit conversions
Extent(1:2) = unitconv(Extent(1:2),Constr.xUnits,Constr.xDisplayUnits);
Extent(3:4) = unitconv(Extent(3:4),Constr.yUnits,Constr.yDisplayUnits);
