This is a static copy of a profile reportHome
legendcolorbarlayout>getPixelBounds (1 call, 0.010 sec)
Generated 28-Feb-2011 19:18:38 using cpu time.
M-subfunction in file /Applications/MATLAB_R2010a.app/toolbox/matlab/scribe/legendcolorbarlayout.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 |
662 | topChange = localGetTitleHeigh... | 1 | 0.010 s | 100.0% |  |
664 | corner2(4) = corner2(4) - topC... | 1 | 0 s | 0% |  |
663 | corner2(2) = corner2(2) - topC... | 1 | 0 s | 0% |  |
660 | end | 1 | 0 s | 0% |  |
659 | corner1(4) = corner1(4) + bott... | 1 | 0 s | 0% |  |
All other lines | | | 0 s | 0% |  |
Totals | | | 0.010 s | 100% | |
Children (called functions)
M-Lint results
No M-Lint messages.Coverage results
[ Show coverage for parent directory ]
Total lines in function | 39 |
Non-code lines (comments, blank lines) | 7 |
Code lines (lines that can run) | 32 |
Code lines that did run | 28 |
Code lines that did not run | 4 |
Coverage (did run/can run) | 87.50 % |
Function listing
time calls line
626 function [corner1,corner2] = getPixelBounds(ax,textObjects,withPixBounds)
1 627 corner1 = get(textObjects(1),'PixelBounds');
1 628 corner2 = get(textObjects(2),'PixelBounds');
1 629 if ~withPixBounds || all(corner1 == 0) || all(corner2 == 0)
1 630 opos = get(textObjects,'Position');
1 631 set(textObjects,'Units','data');
1 632 corner1 = get(textObjects(1),'Position');
1 633 corner2 = get(textObjects(2),'Position');
1 634 p = topixels(ax,[corner1; corner2]);
1 635 set(textObjects,'Units','normalized');
1 636 set(textObjects,{'Position'},opos);
1 637 corner1 = [p(1,:) p(1,:)];
1 638 corner2 = [p(2,:) p(2,:)];
1 639 end
640
641 % The text objects do not take the XLabel or YLabels into account. Add an
642 % offset for the X-Label and Y-Label for the bottom left corner.
1 643 leftChange = localGetYLabelWidth(ax,'Pixels');
644 % If the Y-axis is on the right, change the top right corner
1 645 if strcmpi(get(ax,'YAxisLocation'),'Right')
646 corner2(1) = corner2(1) + leftChange;
647 corner2(3) = corner2(3) + leftChange;
1 648 else % Otherwise change the bottom left corner
1 649 corner1(1) = corner1(1) - leftChange;
1 650 corner1(3) = corner1(3) - leftChange;
1 651 end
1 652 bottomChange = localGetXLabelHeight(ax,'Pixels');
653 % If the X-axis is on top, change the top right corner
1 654 if strcmpi(get(ax,'XAxisLocation'),'Top')
655 corner2(2) = corner2(2) - bottomChange;
656 corner2(4) = corner2(4) - bottomChange;
1 657 else % Otherwise change the bottom left corner
1 658 corner1(2) = corner1(2) + bottomChange;
1 659 corner1(4) = corner1(4) + bottomChange;
1 660 end
661 % We also need to deal with titles;
< 0.01 1 662 topChange = localGetTitleHeight(ax,'Pixels');
1 663 corner2(2) = corner2(2) - topChange;
1 664 corner2(4) = corner2(4) - topChange;
Other subfunctions in this file are not included in this listing.