graphics/private/fireprintbehavior (12 calls, 1.270 sec)
Generated 14-Nov-2016 07:47:19 using cpu time.
function in file /usr/local/MATLAB/MATLAB_Production_Server/R2015a/toolbox/matlab/graphics/private/fireprintbehavior.m
Copy to new window for comparing multiple runs
Function Name | Function Type | Calls |
...PrintPath>LocalSetupContentChanges | subfunction | 6 |
...intPath>LocalRestoreContentChanges | subfunction | 6 |
Line Number | Code | Calls | Total Time | % Time | Time Plot |
11 | allobj = findall(h, 'type', 'F... | 12 | 1.250 s | 98.4% | ![]() |
16 | behavior = hggetbehavior(allob... | 156 | 0.010 s | 0.8% | ![]() |
15 | if ishandle(allobj(k)) % callb... | 156 | 0.010 s | 0.8% | ![]() |
35 | end | 12 | 0 s | 0% | ![]() |
34 | end | 156 | 0 s | 0% | ![]() |
All other lines | 0 s | 0% | ![]() | ||
Totals | 1.270 s | 100% |
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
findall | function | 12 | 1.250 s | 98.4% | ![]() |
hggetbehavior | function | 156 | 0.010 s | 0.8% | ![]() |
Self time (built-ins, overhead, etc.) | 0.010 s | 0.8% | ![]() | ||
Totals | 1.270 s | 100% |
Total lines in function | 35 |
Non-code lines (comments, blank lines) | 10 |
Code lines (lines that can run) | 25 |
Code lines that did run | 11 |
Code lines that did not run | 14 |
Coverage (did run/can run) | 44.00 % |
time | calls | line | |
---|---|---|---|
1 | function fireprintbehavior(h,callbackName) | ||
2 | %FIREPRINTBEHAVIOR Fire callback for Print behavior customization | ||
3 | % Helper function for printing. Do not call directly. | ||
4 | |||
5 | |||
6 | % Copyright 1984-2013 The MathWorks, Inc. | ||
7 | |||
12 | 8 | if graphicsversion(h, 'handlegraphics') | |
9 | allobj = findall(h); | ||
12 | 10 | else | |
1.25 | 12 | 11 | allobj = findall(h, 'type', 'Figure', '-or', 'type', 'Axes', ... |
12 | '-or', '-isa', 'matlab.graphics.shape.internal.ScribeGrid'); | ||
12 | 13 | end | |
12 | 14 | for k=1:length(allobj) | |
0.01 | 156 | 15 | if ishandle(allobj(k)) % callbacks might delete other handles |
0.01 | 156 | 16 | behavior = hggetbehavior(allobj(k),'Print','-peek'); |
156 | 17 | if ~isempty(behavior) && isprop(behavior, callbackName) && ... | |
18 | ~isempty(get(behavior,callbackName)) | ||
19 | |||
20 | cb = get(behavior,callbackName); | ||
21 | if isa(cb,'function_handle') | ||
22 | cb(handle(allobj(k)),callbackName); | ||
23 | elseif iscell(cb) | ||
24 | if length(cb) > 1 | ||
25 | feval(cb{1},handle(allobj(k)),callbackName,cb{2:end}); | ||
26 | else | ||
27 | feval(cb{1},handle(allobj(k)),callbackName); | ||
28 | end | ||
29 | else | ||
30 | feval(cb,handle(allobj(k)),callbackName); | ||
31 | end | ||
32 | end | ||
156 | 33 | end | |
156 | 34 | end | |
12 | 35 | end |