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

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

[Octave-bug-tracker] [bug #33765] (FLTK) linestyles not respected for pr


From: Rik
Subject: [Octave-bug-tracker] [bug #33765] (FLTK) linestyles not respected for print
Date: Fri, 17 Feb 2012 17:41:18 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20100101 Firefox/5.0

Follow-up Comment #9, bug #33765 (project octave):

What about the following change instead?  


diff -r 3f6489feca1e src/gl2ps-renderer.h
--- a/src/gl2ps-renderer.h      Thu Feb 16 14:23:13 2012 -0800
+++ b/src/gl2ps-renderer.h      Fri Feb 17 09:36:00 2012 -0800
@@ -52,13 +52,14 @@
   void draw_pixels (GLsizei w, GLsizei h, GLenum format,
                     GLenum type, const GLvoid *data);
 
-  void set_linestyle (const std::string& s, bool use_stipple)
+  void set_linestyle (const std::string& s, bool use_stipple = false)
   {
     opengl_renderer::set_linestyle (s, use_stipple);
-    if (use_stipple)
+
+    if (s == "-" && ! use_stipple)
+      gl2psDisable (GL2PS_LINE_STIPPLE);
+    else
       gl2psEnable (GL2PS_LINE_STIPPLE);
-    else
-      gl2psDisable (GL2PS_LINE_STIPPLE);
   }
 
   void set_polygon_offset (bool on, double offset = 0.0)


It basically follows the code in set_linestyle of gl-render.cc and only
disables stippling if the linestyle is solid AND the the use_stipple option is
off.

I can't say why they coded it that way in the original, but I'm thinking there
might have been an obscure corner case and therefore I would like to follow
their lead as closely as possible.



    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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