www.gusucode.com > mbcmodels 工具箱 matlab 源码程序 > mbcmodels/@xregMdlGui/@modelpane/printcopy.m
function newobj = printcopy(obj, fig) %PRINTCOPY Create a new component for printing the component display % % NEWOBJ = PRINTCOPY(OBJ, FIG) creates and returns a handle to a new % component, NEWOBJ, parented by the specified figure, FIG. The new % object will be used for printing a copy of the component OBJ. % Copyright 2000-2004 The MathWorks, Inc. and Ford Global Technologies, Inc. scrollobj = obj.hAxes.printcopy(fig); % Create a layout so the information is not resized when printing. (This % stretches the axes and makes things look wrong) sz = obj.hAxes.printSize; newobj = xreggridbaglayout(fig, ... 'dimension', [1 1], ... 'rowsizes', sz(2), ... 'colsizes', sz(1), ... 'elements', {scrollobj}, ... 'border', [1 1 1 1]);