This is a static copy of a profile reportHome
print>LocalAdjustPrintParamsForDepViewer (40 calls, 0.000 sec)
Generated 05-Aug-2011 13:03:34 using cpu time.
subfunction in file /usr/local/MATLAB/R2011a/toolbox/matlab/graphics/print.m
Copy to new window for comparing multiple runs
Parents (calling functions)
Lines where the most time was spent
No measurable time spent in this functionLine Number | Code | Calls | Total Time | % Time | Time Plot |
426 | end | 40 | 0 s | 0% |  |
382 | if( length(pj.Handles) == 1 &a... | 40 | 0 s | 0% |  |
All other lines | | | 0 s | 0% |  |
Totals | | | 0 s | 0% | |
Children (called functions)
No childrenCode Analyzer results
No Code Analyzer messages.Coverage results
[ Show coverage for parent directory ]
Total lines in function | 49 |
Non-code lines (comments, blank lines) | 24 |
Code lines (lines that can run) | 25 |
Code lines that did run | 2 |
Code lines that did not run | 23 |
Coverage (did run/can run) | 8.00 % |
Function listing
time calls line
378 function LocalAdjustPrintParamsForDepViewer(pj)
379 % Special case to handle the Printing parameters for ModelDependencyViewer
380 % (a tool used to view model/library dependencies for Simulink Models)
381
40 382 if( length(pj.Handles) == 1 && ...
383 strcmpi(get(pj.Handles{1},'Tag'),'DAStudio.DepViewer') )
384
385 h = pj.Handles{1};
386 set(h,'PaperUnits','points');
387 pSize = get(h,'PaperSize');
388 pPos = get(h,'PaperPosition');
389
390 paddingMarginPoints = 10; % printing margin in points
391
392 ax = get(h,'CurrentAxes');
393 set(ax,'Units','points'); % make sure we are all in points
394 axPos = get(ax,'Position');
395
396 % Set the target with and target height and adjust for marigins
397 targetWidth = min(pSize(1),pPos(3))-paddingMarginPoints;
398 targetHeight = min(pSize(2),pPos(4))-paddingMarginPoints;
399
400 % Get the ratio of width
401 widthRatio = targetWidth/axPos(3);
402 heightRatio = targetHeight/axPos(4);
403
404 % Get the minimum of the ratio ...
405 minScale = min(widthRatio,heightRatio);
406
407 % .. and apply to the targetWidth and targetHeight
408 newWidth = axPos(3)*minScale;
409 newHeight = axPos(4)*minScale;
410
411 % Set the new width and height of the axes
412 set(ax,'Position',[(targetWidth-newWidth)/2 (targetHeight-newHeight)/2 newWidth-2*paddingMarginPoints newHeight-2*paddingMarginPoints]);
413
414 % Set the paper position of the figure such that there is 10 pixel
415 % margin from left and bottom.
416 set(h,'PaperPosition',[((pSize(1)-targetWidth)/2) + paddingMarginPoints ((pSize(2)-targetHeight)/2) + paddingMarginPoints ...
417 min(pSize(1),pPos(3)) min(pSize(2),pPos(4))]);
418
419 % apply scale to all the texts in the model
420 texts = findall(h,'type','text');
421 for k = 1:length(texts)
422 fontSize = get(texts(k),'FontSize');
423 set(texts(k),'FontSize',fontSize*minScale);
424 end
425 end
40 426 end
Other subfunctions in this file are not included in this listing.