diff scripts/plot/private/__fltk_print__.m @ 14389:6b2448555bbd

Fix Z-order stacking of axis background for FLTK printing (bug #35559) * __fltk_print__.m: Pass a 2D option to gl2ps renderer. * gl2ps-renderer.cc (draw): Switch sort order for passing objects to renderer based on 2D option.
author Rik <octave@nomad.inbox5.com>
date Tue, 21 Feb 2012 14:04:05 -0800
parents 447b57ebc27b
children 1928af0f641b
line wrap: on
line diff
--- a/scripts/plot/private/__fltk_print__.m	Mon Feb 20 13:41:50 2012 -0800
+++ b/scripts/plot/private/__fltk_print__.m	Tue Feb 21 14:04:05 2012 -0800
@@ -148,6 +148,17 @@
 
   opts.pipeline = pipeline;
 
+  ## Tell gl2ps to use different rendering options for 2D plots
+  haxes = findall (opts.figure, "type", "axes");
+  vw = get (haxes, "view");
+  if (iscell (v))
+    vw = vertcat (vw{:});
+  end
+  is2D = all (abs (vw(:,2)) == 90);
+  if (is2D)
+    gl2ps_device{end} = [gl2ps_device{end}, "is2D"];
+  endif
+
   for n = 1:numel(pipeline)
     if (opts.debug)
       fprintf ("fltk-pipeline: '%s'\n", pipeline{n});