octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #35559] lines not printed


From: Ben Abbott
Subject: [Octave-bug-tracker] [bug #35559] lines not printed
Date: Tue, 21 Feb 2012 19:12:53 +0000
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11

Update of bug #35559 (project octave):

             Assigned to:                bpabbott => rik5                   

    _______________________________________________________

Follow-up Comment #22:

The GL2PS_BSP_SORT has less trouble with 2D plots than GL2PS_NO_SORT has with
3D. Perhaps the subplot problem can be mitigated by checking that all plots
are 2D before switching to GL2PS_NO_SORT ?


diff --git a/scripts/plot/private/__fltk_print__.m
b/scripts/plot/private/__fltk_print__.m
--- 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", "visible", "on");
+  v = get (haxes, "view");
+  if (iscell (v))
+    v = abs (vertcat (v{:}));
+  end
+  is2D = all (abs (v(:,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});
diff --git a/src/gl2ps-renderer.cc b/src/gl2ps-renderer.cc
--- a/src/gl2ps-renderer.cc
+++ b/src/gl2ps-renderer.cc
@@ -72,11 +72,15 @@
       GLint gl2ps_text = 0;
       if (term.find ("notxt") != std::string::npos) gl2ps_text =
GL2PS_NO_TEXT;
 
+      // Default sort order optimizes for 3D plots
+      GLint gl2ps_sort = GL2PS_BSP_SORT;
+      if (term.find ("is2D") != std::string::npos) gl2ps_sort =
GL2PS_NO_SORT;
+
       while (state == GL2PS_OVERFLOW)
         {
           buffsize += 1024*1024;
           gl2psBeginPage ("glps_renderer figure", "Octave", viewport,
-                          gl2ps_term, GL2PS_BSP_SORT,
+                          gl2ps_term, gl2ps_sort,
                           (GL2PS_SILENT | GL2PS_SIMPLE_LINE_OFFSET
                            | GL2PS_NO_BLENDING | GL2PS_OCCLUSION_CULL
                            | GL2PS_BEST_ROOT | gl2ps_text


Using this changeset, I don't see any problems with any of the plot demos. If
we add a subplot demo that includes a 3d mesh and a 2d filled contour, then I
expect the 2d filled contour to have problems.

Unless you see a way to use different viewports for different axes, I suggest
you push the changeset.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?35559>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]