diff scripts/plot/private/__fltk_print__.m @ 14461:80e8c03548a4 gui

Merge default onto gui
author Jordi Gutiérrez Hermoso <jordigh@octave.org>
date Tue, 13 Mar 2012 19:11:52 -0400
parents 1928af0f641b
children 86854d032a37
line wrap: on
line diff
--- a/scripts/plot/private/__fltk_print__.m
+++ b/scripts/plot/private/__fltk_print__.m
@@ -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 (vw))
+    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});