comparison scripts/plot/private/__ghostscript__.m @ 14774:0d6dae0f6bc2

Allow setting of ghostscript TextAlphaBits and GraphicsAlphaBits. * scripts/plot/private/__print_parse_opts__.m: Add AlphaBits options for ghostscript. * scripts/plot/private/__ghostscript__.m: Include AlphaBits options. * doc/interpreter/contributors.in: Add John Hunt.
author John Hunt <huntj@gmx.us>
date Fri, 15 Jun 2012 21:13:48 -0400
parents 1c7956c661a8
children 460a3c6d8bf1
comparison
equal deleted inserted replaced
14773:5c269b73f467 14774:0d6dae0f6bc2
30 opts.source = "-"; 30 opts.source = "-";
31 opts.output = "-"; 31 opts.output = "-";
32 opts.device = ""; 32 opts.device = "";
33 opts.epscrop = false; 33 opts.epscrop = false;
34 opts.antialiasing = false; 34 opts.antialiasing = false;
35 opts.antialiasing_textalphabits = 4;,
36 opts.antialiasing_graphicsalphabits = 4;
35 opts.resolution = 150; 37 opts.resolution = 150;
36 opts.papersize = ""; 38 opts.papersize = "";
37 opts.pageoffset = [0 0]; 39 opts.pageoffset = [0 0];
38 opts.debug = false; 40 opts.debug = false;
39 opts.level = []; 41 opts.level = [];
68 gs_opts = sprintf ("%s -dLanguageLevel=%d", gs_opts, round (opts.level)); 70 gs_opts = sprintf ("%s -dLanguageLevel=%d", gs_opts, round (opts.level));
69 endif 71 endif
70 72
71 if (opts.antialiasing && isempty (strfind (opts.device, "write"))) 73 if (opts.antialiasing && isempty (strfind (opts.device, "write")))
72 ## Apply anti-aliasing to all bitmap formats/devices 74 ## Apply anti-aliasing to all bitmap formats/devices
73 gs_opts = sprintf ("%s -dTextAlphaBits=4 -dGraphicsAlphaBits=4", gs_opts); 75 gs_opts = sprintf ("%s -dTextAlphaBits=%d -dGraphicsAlphaBits=%d",
76 gs_opts, opts.antialiasing_textalphabits,
77 opts.antialiasing_graphicsalphabits);
74 gs_opts = sprintf ("%s -r%dx%d", gs_opts, [1, 1] * opts.resolution); 78 gs_opts = sprintf ("%s -r%dx%d", gs_opts, [1, 1] * opts.resolution);
75 elseif (any (strcmp (opts.device, {"pswrite", "ps2write", "pdfwrite"}))) 79 elseif (any (strcmp (opts.device, {"pswrite", "ps2write", "pdfwrite"})))
76 gs_opts = sprintf ("%s -dEmbedAllFonts=true", gs_opts); 80 gs_opts = sprintf ("%s -dEmbedAllFonts=true", gs_opts);
77 if (strcmp (opts.device, "pdfwrite")) 81 if (strcmp (opts.device, "pdfwrite"))
78 ## Optimize for loading 82 ## Optimize for loading