bugGNU Octave - Bugs: bug #33765, (FLTK) linestyles not respected...

 
 

bug #33765: (FLTK) linestyles not respected for print

Submitted by:  Muhali <muhali>
Submitted on:  Wed 13 Jul 2011 09:14:55 PM UTC  
 
Category: Plotting with OpenGLSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: devOperating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Wed 24 Jun 2015 04:34:29 AM UTC, comment #17:

Still works for me on 4.0.0. This is on Kubuntu 12.04. This is with gl2ps-1.3.6.

Rik <rik5>
Project Administrator
Thu 18 Jun 2015 06:17:00 AM UTC, comment #16:

I have checked this in MXE-Octave on Win7 machine and it seems to be OK.
I used the example in comment #1 - there are two lines, one
is dashed and one is dotted, both in the pdf and the png.

Note that in gs2ps is shipped with MXE-Octave.

Avinoam Kalma <avinoam>
Project Member
Mon 15 Jun 2015 03:05:57 PM UTC, comment #15:

It seems that this bug is back on Octave 4.0.0. Is that because we no longer ship gl2ps and is therefore an upstream bug? It affects both qt and fltk printing.

Carnë Draug <carandraug>
Project Member
Sat 28 Dec 2013 07:18:14 PM UTC, comment #14:

The changeset was pushed in February. It's a part of the code base that will be the 3.8.0 release in a week or so from now.

Rik <rik5>
Project Administrator
Sat 28 Dec 2013 06:39:42 PM UTC, comment #13:

It looks like this patch never made it out of the development branch.

-Deleted Account- <beansbaxter>
Fri 17 Feb 2012 09:55:12 PM UTC, comment #12:

gl2ps-renderer.h and gl2ps-renderer.cc are both part of Octave (not part of gl2ps).

Ben Abbott <bpabbott>
Project Member
Fri 17 Feb 2012 08:55:37 PM UTC, comment #11:

The bug has been fixed in this changeset (http://hg.savannah.gnu.org/hgweb/octave/rev/81183cd6eaae) on the development branch.

Ben, if you ever pull across the gl2ps code again we need to make sure this patch is re-applied.

Rik <rik5>
Project Administrator
Fri 17 Feb 2012 07:01:12 PM UTC, comment #10:

Rik, your changeset looks better! Please go ahead and push it.

Ben Abbott <bpabbott>
Project Member
Fri 17 Feb 2012 05:41:18 PM UTC, comment #9:

What about the following change instead?

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.

Rik <rik5>
Project Administrator
Fri 17 Feb 2012 04:14:21 PM UTC, comment #8:

The simpler changeset below is sufficient.

Ben Abbott <bpabbott>
Project Member
Fri 17 Feb 2012 02:23:19 PM UTC, comment #7:

The change below works for me.

I modified gl2ps_renderer.h (set_linestyle) to behave as gl_render.cc (opengl_renderer::set_linestyle) does.

Any concerns ?

Ben Abbott <bpabbott>
Project Member
Fri 17 Feb 2012 01:00:25 PM UTC, comment #6:

Looking at gl-render.cc

The use_stipple booleans all look backwards to me. I expected something like below.

Note, that this part of the code is working correctly. What am I missing ?

Also, why not let opengl_renderer::set_linestyle() determine the value for use_stipple ? Passing the boolean looks redundant to me.

Ben Abbott <bpabbott>
Project Member
Fri 17 Feb 2012 05:57:42 AM UTC, comment #5:

The problem seems to be that the variable use_stipple is not being passed in correctly. I hardwired use_stipple in gl2ps-render.h like so

and then used the reporter's example

The output shows the correct dashed line.

Now we just need to trace back and figure out who is calling set_linestyle with the wrong value of use_stipple.

Rik <rik5>
Project Administrator
Fri 17 Feb 2012 02:22:11 AM UTC, comment #4:

From gl-render.cc,

From gl2ps-renderer.h,

This looks correct to me. Anyone see something I don't ?

Ben Abbott <bpabbott>
Project Member
Fri 17 Feb 2012 02:09:16 AM UTC, comment #3:

This problem looks to have a straight forward solution.

Looking at the link below (search on "Stippled Lines")

http://fly.cc.fer.hr/~unreal/theredbook/chapter02.html

Dashed, dotted, and dash/dot/dash lines may be produced on screen by,

The Tips & Tricks of gl2ps (http://geuz.org/gl2ps/#tth_sEc4) mentions


gl2psEnable(GL2PS_LINE_STIPPLE) uses the current values of the OpenGL stippling options to compute the stippling pattern and repetition factor. You thus need to call gl2psEnable(GL2PS_LINE_STIPPLE) after calling glLineStipple(factor, pattern).

Ben Abbott <bpabbott>
Project Member
Wed 28 Sep 2011 05:11:02 AM UTC, comment #2:

Changing the bug category to "Plotting with OpenGL" since this only affects the FLTK toolkit.

Rik <rik5>
Project Administrator
Tue 30 Aug 2011 06:14:00 AM UTC, comment #1:

Just wanted to point out that none of the following seem to work either:

Also note that neither dotted (":") nor dashed ("--") linestyles appear in the generated files (they appear solid), while they both appear correctly in the plot displayed on the screen.

A simple test program might be:

J Edwards <jedwards>
Wed 13 Jul 2011 09:14:55 PM UTC, original submission:

Doing a simple

produces the correct (dotted) plot, but printing does not (using e.g. "png").

M.

Muhali <muhali>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #23902:  sincos-screenshot.png added by jedwards (47KiB - image/png - Attaching screenshot showing lines are correctly generated for screen but incorrectly printed. Note that these files were generated using the sample code I included earlier. (OCTAVE_VERSION() = "3.5.0+"))

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by avinoam (Posted a comment)
  • -unavailable- added by beansbaxter (Posted a comment)
  • -unavailable- added by bpabbott (Posted a comment)
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by jedwards (Posted a comment)
  • -unavailable- added by muhali (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 17 Feb 2012 08:55:37 PM UTCrik5StatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
    Fri 17 Feb 2012 02:09:16 AM UTCbpabbottItem GroupNone=>Incorrect Result
      Operating SystemGNU/Linux=>Any
    Sun 02 Oct 2011 12:48:47 AM UTCrik5StatusNone=>Confirmed
    Wed 28 Sep 2011 05:11:02 AM UTCrik5CategoryNone=>Plotting with OpenGL
      Summary(fltk) linestyles not respected for print=>(FLTK) linestyles not respected for print
    Tue 30 Aug 2011 06:18:35 AM UTCjedwardsAttached File-=>Added sincos-screenshot.png, #23902

    Back to the top


    Powered by Savane 3.1-cleanup1