www.gusucode.com > mbclayouts 工具箱 matlab 源码程序 > mbclayouts/@xregflowlayout/private/position.m
function pos = position(handles) % Synopsis % % % Description % % % Example % % % See Also % Copyright 2000-2004 The MathWorks, Inc. and Ford Global Technologies, Inc. minx = realmax; miny = realmax; maxx = -realmax; maxy = -realmax; l = length(handles); for k = 1:l p = get(handles{k},'Position'); p(3:4) = p(1:2) + p(3:4); if p(1) < minx; minx = p(1); end; if p(2) < miny; miny = p(2); end; if p(3) > maxx; maxx = p(3); end; if p(4) > maxy; maxy = p(4); end; end; w = maxx - minx; h = maxy - miny; pos = [minx miny w h];