changeset 24084:71a449b29cc7

Save/Restore state of postscript program when dumping text (bug #48567) * gl2ps-print.cc (gl2ps_renderer::strlist_to_ps): use gsave/grestore around raw post script strings to not mess the current state of the program
author Pantxo Diribarne <pantxo.diribarne@gmail.com>
date Fri, 22 Sep 2017 15:45:46 +0200
parents 1457c018b683
children ca7cef297280
files libinterp/corefcn/gl2ps-print.cc
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/gl2ps-print.cc	Thu Sep 21 22:51:54 2017 -0700
+++ b/libinterp/corefcn/gl2ps-print.cc	Fri Sep 22 15:45:46 2017 +0200
@@ -791,6 +791,8 @@
     Matrix prev_color (1, 3, -1);
 
     std::ostringstream ss;
+    ss << "gsave\n";
+
     for (const auto& txtobj : lst)
       {
         // Color
@@ -832,7 +834,7 @@
            << " /" << fontname << " SRX\n";
       }
 
-    ss << "\n";
+    ss << "grestore\n";
 
     return ss.str ();
   }