This is a static copy of a profile reportHome
printjob (80 calls, 0.219 sec)
Generated 05-Aug-2011 13:03:29 using cpu time.
function in file /usr/local/MATLAB/R2011a/toolbox/matlab/graphics/printjob.m
Copy to new window for comparing multiple runs
Parents (calling functions)
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
84 | pj.XTerminalMode = LocalXTermi... | 80 | 0.208 s | 95.0% |  |
103 | end | 80 | 0 s | 0% |  |
101 | pj.RGBImage = 0; % ... | 80 | 0 s | 0% |  |
87 | if ~pj.UseOriginalHGPrinting | 80 | 0 s | 0% |  |
86 | pj.UseOriginalHGPrinting = 1; | 80 | 0 s | 0% |  |
All other lines | | | 0.011 s | 5.0% |  |
Totals | | | 0.219 s | 100% | |
Children (called functions)
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
printjob>LocalXTerminalMode | subfunction | 80 | 0.208 s | 95.0% |  |
printopt | function | 80 | 0 s | 0% |  |
Self time (built-ins, overhead, etc.) | | | 0.011 s | 5.0% |  |
Totals | | | 0.219 s | 100% | |
Code Analyzer results
No Code Analyzer messages.Coverage results
[ Show coverage for parent directory ]
Total lines in function | 103 |
Non-code lines (comments, blank lines) | 35 |
Code lines (lines that can run) | 68 |
Code lines that did run | 54 |
Code lines that did not run | 14 |
Coverage (did run/can run) | 79.41 % |
Function listing
time calls line
1 function pj = printjob()
2 %PRINTJOB Constructor for PrintJob objects.
3 % PrintJob is the object used to encapsulate all the data needed to export
4 % Figures and models from MATLAB and Simulink. Constructor defines every
5 % class variable and gives them default values. Comments in this file
6 % describe what each variable is for. It is not meant that MATLAB users
7 % will create PrintJob objects themselves; unless they are trying to take
8 % full control of the outputting of a Figure or graph. PrintJob is used by
9 % the various MATLAB files that control printing and image output from MATLAB
10 % and Simulink.
11 %
12 % Ex:
13 % pj = PRINTJOB;
14 %
15 % See also PRINT.
16
17 % Copyright 1984-2010 The MathWorks, Inc.
18
80 19 if feature('HGUsingMATLABClasses')
20 pj = graphics.internal.mlprintjob;
21 return
22 end
23
80 24 pj.Handles = []; %Matrix of handles to Figures and/or models to print
80 25 pj.Driver = ''; %Current driver chosen from list in tables
80 26 pj.FileName = ''; %Real or temp name of output
80 27 pj.PageNumber = 0; %What page output we are currently drawing
80 28 pj.Active = 0; %Currently connected to a driver
80 29 pj.Return = 0; %Return value from HARDCOPY, could be meta handle or uint8 image
30
80 31 pj.AllFigures = []; %Array of handles to all Figures, for setting Watch pointers
80 32 pj.AllPointers = []; %String or cell array of strings of current Pointers
33
80 34 pj.PrinterName = ''; %Name of networked device to send output file
80 35 pj.SimWindowName =''; %Name of Simulink model being printed
80 36 pj.Renderer = ''; %Renderer mode to use while printing/exporting
80 37 pj.rendererOption = 0; %True if user specified renderer on cmd line
80 38 pj.PrintOutput = 0; %True if want to send driver output to a device
80 39 pj.Verbose = 0; %True if want to show system print dialog
80 40 pj.Orientation = ''; %Oiginal orientation of Figure/model if have to switch
80 41 pj.hgdata = []; %Structure of data for restoration of Figure and children
80 42 pj.PaperUnits = ''; %Original PaperUnits while we work in Points
43
80 44 pj.PrintUI = 1; %True if want to print UIControls (Beans/ActiveX?)
80 45 pj.nouiOption = 0; %True if user specified -noui on cmd line
80 46 pj.UIData = []; %Holds handles and data for faux Uicontrols
80 47 pj.DPI = -1; %Resolution for Tiff, Jpeg, and PS, including for Ghostscript; -1 means use internal default
48
80 49 pj.DriverExt = ''; %Filename extension associated with current driver
80 50 pj.DriverClass = ''; %What type of driver is it, PS, Windows, ...
80 51 pj.DriverExport = 0; %True if driver is an image format normally saved to disk
52
80 53 pj.DriverColor = 0; %True if driver supports color (i.e. will not NODITHER)
80 54 pj.DriverColorSet = 0; %True if command line arguments included device (which set DriverColor)
55
80 56 pj.DriverClipboard = 0; %True if driver supports copying to clipboard
80 57 pj.ClipboardOption = 0; %reserved for future use
58
80 59 pj.GhostDriver = ''; %Holds onto driver requested from GS while we use PS
80 60 pj.GhostName = ''; %Eventual name from GS if generating temp PS file
80 61 pj.GhostImage = 0; %True if converting PS to an image format for export or preview
80 62 pj.GhostExtent = []; %Width and height in points of image/BoundingBox/PaperPosition
80 63 pj.GhostTranslation = []; %All objects on page must be moved for GS image formats (including preview)
64
80 65 pj.PostScriptAppend = 0; %True if want to append PS file to existing one
80 66 pj.PostScriptLatin1 = 1; %True if want Latin 1 font encoding and not Adobe's
80 67 pj.PostScriptCMYK = 0; %True if want colors in PS file to be CMYK and not RGB
80 68 pj.PostScriptTightBBox = 1; %True if want to have a tight BoundingBox
80 69 pj.PostScriptPreview = 0; %'Enum' value of preview type, one of:
80 70 pj.TiffPreview = 1; %Currently only supported preview type
71
80 72 pj.TiledPrint = 0; %Override to force all output systems to be tiled
80 73 pj.FromPage = 1; %Page number of first output tiled page
80 74 pj.ToPage = 9999; %Page number of last output tiled page
80 75 pj.FramePrint = 0; %Printing with frames
76
80 77 [ pj.PrintCmd, pj.DefaultDevice ] = printopt; %Defaults
80 78 pj.Error = 0; %Error condition
80 79 pj.Exception = []; %This needs to be set whenever pj.Error turns 1
80 80 pj.DebugMode = 0; %Boolean true want to output diagnostics while printing.
81
80 82 pj.Validated = 0; %flag to say if this print job has been validated
83
0.21 80 84 pj.XTerminalMode = LocalXTerminalMode; %Boolean true if on Unix/VMS and not X
85
80 86 pj.UseOriginalHGPrinting = 1;
80 87 if ~pj.UseOriginalHGPrinting
88 pj.PaperType = get(0, 'DefaultFigurePaperType');
89 pj.PaperUnits = get(0, 'DefaultFigurePaperUnits');
90
91 defPaperPos = get(0, 'DefaultFigurePaperPosition');
92 pj.PaperPosition_X = defPaperPos(1);
93 pj.PaperPosition_Y = defPaperPos(2);
94 pj.PaperPosition_Width = defPaperPos(3);
95 pj.PaperPosition_Height = defPaperPos(4);
96
97 defPos = get(0, 'DefaultFigurePosition');
98 pj.Original_Width = defPos(3);
99 pj.Original_Height = defPos(4);
100 end
80 101 pj.RGBImage = 0; % reserved for future use.
102
80 103 end
Other subfunctions in this file are not included in this listing.