comparison scripts/plot/print.m @ 10954:ee9d74048827

Consolidate gs code into print.m.
author Ben Abbott <bpabbott@mac.com>
date Wed, 08 Sep 2010 18:15:28 -0400
parents dd6b90f44ae5
children 064aaf82222f
comparison
equal deleted inserted replaced
10953:9c0b366583cb 10954:ee9d74048827
326 endif 326 endif
327 set (h, "fontsize", fontsize) 327 set (h, "fontsize", fontsize)
328 endif 328 endif
329 endif 329 endif
330 330
331 if (strcmp (opts.devopt, opts.ghostscript.device))
332 opts.ghostscript.output = opts.name;
333 opts.ghostscript.source = strcat (tmpnam (), ".eps");
334 opts.unlink{end+1} = opts.ghostscript.source;
335 endif
336
331 ## call the backend print script 337 ## call the backend print script
332 feval (strcat ("__", get (opts.figure, "__backend__") , "_print__"), opts); 338 opts = feval (strcat ("__", get (opts.figure, "__backend__"), "_print__"),
339 opts);
340
341 if (strcmp (opts.devopt, opts.ghostscript.device))
342 if (opts.tight_flag && ! opts.formatted_for_printing)
343 __tight_eps_bbox__ (opts, opts.ghostscript.source);
344 endif
345 status = __ghostscript__ (opts.ghostscript);
346 if (status != 0)
347 warning ("print.m:gsfailed", "print.m: ghostscript failure")
348 endif
349 endif
333 350
334 ## Send to the printer 351 ## Send to the printer
335 if (opts.send_to_printer) 352 if (opts.send_to_printer)
336 if (isempty (opts.ghostscript.output)) 353 if (isempty (opts.ghostscript.output))
337 prn_datafile = opts.name; 354 prn_datafile = opts.name;