diff scripts/plot/private/__print_parse_opts__.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 ad542fdd8c8f
children 5d3a684236b0
line wrap: on
line diff
--- a/scripts/plot/private/__print_parse_opts__.m	Fri Jun 15 10:15:07 2012 -0700
+++ b/scripts/plot/private/__print_parse_opts__.m	Fri Jun 15 21:13:48 2012 -0400
@@ -49,6 +49,8 @@
   arg_st.ghostscript.pageoffset = [];
   arg_st.ghostscript.resolution = 150;
   arg_st.ghostscript.antialiasing = false;
+  arg_st.ghostscript.antialiasing_textalphabits = 4;
+  arg_st.ghostscript.antialiasing_graphicsalphabits = 4;
   arg_st.loose = false;
   arg_st.lpr_binary = __quote_path__ (__find_binary__ ("lpr"));
   arg_st.name = "";
@@ -118,6 +120,20 @@
         arg_st.fig2dev_binary = arg{10:end};
       elseif (strncmp (arg, "-PSTOEDIT:", 9))
         arg_st.pstoedit_binary = arg{10:end};
+      elseif (strncmpi (arg, "-textalphabits=", 15))
+        n = find (arg == "=");
+        if (! isempty (n) && n == numel (arg) - 1 && ismember (arg(end), "124"))
+          arg_st.ghostscript.antialiasing_textalphabits = str2num (arg(end));
+        else
+          error ("print: improper syntax, or value, for TextAlphaBits")
+        endif
+      elseif (strncmpi (arg, "-graphicsalphabits=", 19))
+        n = find (arg == "=");
+        if (! isempty (n) && n == numel (arg) - 1 && ismember (arg(end), "124"))
+          arg_st.ghostscript.antialiasing_graphicsalphabits = str2num (arg(end));
+        else
+          error ("print: improper syntax, or value, for GraphicsAlphaBits")
+        endif
       elseif ((length (arg) > 2) && arg(1:2) == "-G")
         arg_st.ghostscript.binary = file_in_path (getenv ("PATH"), arg(3:end));
         if (isempty (arg_st.ghostscript.binary))