diff scripts/plot/util/private/__print_parse_opts__.m @ 30958:8a8f82c0235e

print.m: Add options "-image"/"-vector" for Matlab compatibility. These options duplicate the "-opengl" and "-painters" arguments and set the Renderer used by Octave for printing. The names more clearly show the intent and are Matlab compatible. * NEWS.8.md: Announce additional options. * print.m: Add new options to docstring. * __print_parse_opts__.m: Decode additional arguments and set "renderer" field appropriately.
author Rik <rik@octave.org>
date Thu, 21 Apr 2022 14:52:35 -0700
parents 796f54d4ddbf
children 767c9131cf64
line wrap: on
line diff
--- a/scripts/plot/util/private/__print_parse_opts__.m	Thu Apr 21 13:53:27 2022 -0700
+++ b/scripts/plot/util/private/__print_parse_opts__.m	Thu Apr 21 14:52:35 2022 -0700
@@ -108,6 +108,10 @@
         arg_st.force_solid = -1;
       elseif (any (strcmp (arg, {"-opengl", "-painters"})))
         arg_st.renderer = arg(2:end);
+      elseif (strcmp (arg, "-image"))
+        arg_st.renderer = "opengl";
+      elseif (strcmp (arg, "-vector"))
+        arg_st.renderer = "painters";
       elseif (strcmp (arg, "-RGBImage"))
         arg_st.rgb_output = true;
         arg_st.renderer = "opengl";