changeset 29883:0f6dc48a740e stable

maint: merge away extra head on stable branch.
author Rik <rik@octave.org>
date Wed, 14 Jul 2021 20:21:44 -0700
parents b7d0b4ab1191 (current diff) 2624ee427735 (diff)
children 0bd113ec8c37 dffd1c943f1a
files
diffstat 2 files changed, 10 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/plot/util/copyobj.m	Sun Jul 11 13:42:19 2021 -0400
+++ b/scripts/plot/util/copyobj.m	Wed Jul 14 20:21:44 2021 -0700
@@ -203,9 +203,9 @@
 %! set (hnew, "position", [scrn(3)/2, scrn(4)/2-pos(4)/2, pos(3:4)]);
 %! drawnow ();
 
-%!testif HAVE_MAGICK; any (strcmp ("gnuplot", available_graphics_toolkits ()))
+%!testif HAVE_MAGICK; (have_window_system () && __have_feature__ ("QT_OFFSCREEN") && any (strcmp ("qt", available_graphics_toolkits ())));
 %! toolkit = graphics_toolkit ();
-%! graphics_toolkit ("gnuplot");
+%! graphics_toolkit ("qt");
 %! unwind_protect
 %!   h1 = figure ("visible", "off", "paperposition", [0.25, 2.5, 8.0, 6.0]);
 %!   x = 0:0.1:2*pi;
@@ -227,9 +227,9 @@
 %!   png1 = [tempname() ".png"];
 %!   png2 = [tempname() ".png"];
 %!   unwind_protect
-%!     print (h1, png1);
+%!     print (h1, "-r100", png1);
 %!     [img1, map1, alpha1] = imread (png1);
-%!     print (h2, png2);
+%!     print (h2, "-r100", png2);
 %!     [img2, map2, alpha2] = imread (png2);
 %!   unwind_protect_cleanup
 %!     unlink (png1);
--- a/scripts/plot/util/hgsave.m	Sun Jul 11 13:42:19 2021 -0400
+++ b/scripts/plot/util/hgsave.m	Wed Jul 14 20:21:44 2021 -0700
@@ -90,7 +90,9 @@
 endfunction
 
 
-%!testif HAVE_MAGICK; (have_window_system () && __have_feature__ ("QT_OFFSCREEN") && strcmp ("qt", graphics_toolkit ())) || strcmp ("gnuplot", graphics_toolkit ());
+%!testif HAVE_MAGICK; (have_window_system () && __have_feature__ ("QT_OFFSCREEN") && any (strcmp ("qt", available_graphics_toolkits ())));
+%! toolkit = graphics_toolkit ();
+%! graphics_toolkit ("qt");
 %! h1 = figure ("visible", "off", "paperposition", [0.25, 2.5, 8.0, 6.0]);
 %! unwind_protect
 %!   x = 0:0.1:2*pi;
@@ -111,10 +113,10 @@
 %!   png2 = [tempname() ".png"];
 %!   unwind_protect
 %!     hgsave (h1, ftmp);
-%!     print (h1, png1);
+%!     print (h1, "-r100", png1);
 %!     [img1, map1, alpha1] = imread (png1);
 %!     h2 = hgload (ftmp);
-%!     print (h2, png2);
+%!     print (h2, "-r100", png2);
 %!     [img2, map2, alpha2] = imread (png2);
 %!   unwind_protect_cleanup
 %!     unlink (ftmp);
@@ -127,6 +129,7 @@
 %! unwind_protect_cleanup
 %!   close (h1);
 %!   close (h2);
+%!   graphics_toolkit (toolkit);
 %! end_unwind_protect
 
 ## Test input validation