Mercurial > octave
changeset 29860:2624ee427735 stable
hgsave.m, copyobj.m: Use 'qt' graphics toolkit in BISTs.
hgsave.m, copyobj.m: Use %!testif to check for 'qt' toolkit before running
specific BISTs.
author | Rik <rik@octave.org> |
---|---|
date | Thu, 08 Jul 2021 09:56:02 -0700 |
parents | 65f0754d9569 |
children | 4583e97411a2 0f6dc48a740e |
files | scripts/plot/util/copyobj.m scripts/plot/util/hgsave.m |
diffstat | 2 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/plot/util/copyobj.m Thu Jul 08 09:36:24 2021 -0700 +++ b/scripts/plot/util/copyobj.m Thu Jul 08 09:56:02 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;
--- a/scripts/plot/util/hgsave.m Thu Jul 08 09:36:24 2021 -0700 +++ b/scripts/plot/util/hgsave.m Thu Jul 08 09:56:02 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; @@ -127,6 +129,7 @@ %! unwind_protect_cleanup %! close (h1); %! close (h2); +%! graphics_toolkit (toolkit); %! end_unwind_protect ## Test input validation