time | Calls | line |
---|
| | 1 | function bool = blt( pj, h )
|
| | 2 | %BLT Returns FALSE if Lines and Text objects in Figure should be printed in black.
|
| | 3 |
|
| | 4 | % Copyright 1984-2014 The MathWorks, Inc.
|
| | 5 |
|
| | 6 | %DriverColorSet was turned to TRUE iff there was a device cmd line argument
|
| | 7 | %If there was a cmd line device argument we use the DriverColor resulting from it
|
| | 8 | %
|
| | 9 | %Otherwise we look for a PrintTemplate object in the Figure
|
| | 10 | %If there is one we return its DriverColor boolean value.
|
| | 11 | %
|
| | 12 | %Otherwise, on windows,
|
| | 13 | % 1. if we're printing from the dialog (pj.Verbose) we
|
| | 14 | % return true (and let the print code determine later if we need to change
|
| | 15 | % to b&w)
|
| | 16 | % 2. if we're not printing from the dialog we base decision on whether or
|
| | 17 | % not the printer supports color
|
| | 18 | %
|
| | 19 | % Otherwise we just look at the driver and whether it says it supports color
|
| | 20 | % (pj.DriverColor)
|
| | 21 |
|
| | 22 | %depviewer should always be printed in color mode to avoid
|
| | 23 | %the going through NODITHER
|
0.002 | 12 | 24 | if( length(pj.Handles) == 1 && ...
|
| 12 | 25 | strcmpi(get(pj.Handles{1},'Tag'),'DAStudio.DepViewer') )
|
| | 26 | bool = true;
|
| | 27 | return;
|
< 0.001 | 12 | 28 | end
|
| | 29 |
|
< 0.001 | 12 | 30 | if pj.DriverColorSet
|
< 0.001 | 12 | 31 | bool = pj.DriverColor;
|
| | 32 | else
|
| | 33 | pt = getprinttemplate(h);
|
| | 34 | if isempty( pt )
|
| | 35 | %default to using setting based on default driver from PRINTOPT.
|
| | 36 | bool = pj.DriverColor;
|
| | 37 | if ispc && strncmp( pj.Driver, 'win', 3 )
|
| | 38 | % using Windows print dialog - determine later if conversion needed
|
| | 39 | if pj.Verbose
|
| | 40 | bool = true;
|
| | 41 | else
|
| | 42 | % command line - ask if printer supports color
|
| | 43 | bool = queryPrintServices('supportscolor', pj.PrinterName);
|
| | 44 | end
|
| | 45 | end
|
| | 46 | else
|
| | 47 | bool = pt.DriverColor;
|
| | 48 | end
|
< 0.001 | 12 | 49 | end
|
| | 50 |
|
< 0.001 | 12 | 51 | bool = logical(bool);
|
< 0.001 | 12 | 52 | end
|
Other subfunctions in this file are not included in this listing.