time | Calls | line |
---|
| | 1 | function pt = getprinttemplate( h )
|
| | 2 | %GETPRINTTEMPLATE Get a figure's PrintTemplate
|
| | 3 |
|
| | 4 | % Copyright 1984-2008 The MathWorks, Inc.
|
| | 5 |
|
< 0.001 | 2 | 6 | pt = get(h, 'PrintTemplate');
|
< 0.001 | 2 | 7 | if ~isempty(pt)
|
| | 8 | if isfield(pt,'VersionNumber')
|
| | 9 | ver = pt.VersionNumber;
|
| | 10 | else
|
| | 11 | ver = nan;
|
| | 12 | end
|
| | 13 | if isnan(ver)
|
| | 14 | ptnew = printtemplate;
|
| | 15 | ptnew.Name = pt.Name;
|
| | 16 | ptnew.FrameName = pt.FrameName;
|
| | 17 | if pt.DriverColor
|
| | 18 | ptnew.DriverColor = 1;
|
| | 19 | else
|
| | 20 | ptnew.DriverColor = 0;
|
| | 21 | end
|
| | 22 | ptnew.AxesFreezeTicks = pt.AxesFreezeTicks;
|
| | 23 | ptnew.AxesFreezeLimits = pt.AxesFreezeLimits;
|
| | 24 | pt = ptnew;
|
| | 25 | end
|
| | 26 | % Append the figure paper properties and header info without changing
|
| | 27 | % the VersionNumber since ptpreparehg and ptrestorehg perform a check
|
| | 28 | % that the VersionNumber is 2 (or more) for the new page layout
|
| | 29 | % PrintTemplate.
|
| | 30 | pt = appendPropsFromFigToPrintTemplate(pt,h);
|
| | 31 | end
|
Other subfunctions in this file are not included in this listing.