bugGNU Octave - Bugs: bug #44418, Qt/FLTK gl2ps EPS printing doesn't...

 
 

bug #44418: Qt/FLTK gl2ps EPS printing doesn't scale and orient image correctly.

Submitter:  Dan Sebald <sebald>
Submitted:  Tue 03 Mar 2015 09:45:48 PM UTC
   
 
Category:  Plotting with OpenGL Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Wont Fix Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Wed 04 Mar 2015 08:24:52 PM UTC, comment #7: 

Is it that far back already?  I haven't upgraded since then because that's when Gnome switched over to 3.0.

I built 1.3.8 gl2ps without many problems (unlike OSMesa).


tar -xzf gl2ps-1.3.8.tgz
cd gl2ps-1.3.8-source
cmake CMakeLists.txt
make install


The one problem is that with these default install directories:


-- Install configuration: "RelWithDebInfo"
-- Installing: /usr/local/lib/libgl2ps.a
-- Installing: /usr/local/lib/libgl2ps.so.1.3.8
-- Up-to-date: /usr/local/lib/libgl2ps.so.1
-- Up-to-date: /usr/local/lib/libgl2ps.so
-- Up-to-date: /usr/local/include/gl2ps.h


(and I uninstalled my old gl2ps version, which basically was /usr/include/gl2ps.h and /usr/lib64/libgl2ps.so) Octave is able to recognize /usr/local/include/gl2ps.h at configure time and build with that gl2ps.h, but at run time Octave can't find the library file:


[@ build1]# ./run-octave
/usr/local/src/octave/octave-gnuplot_bugs44187/build1/src/.libs/lt-octave-gui: error while loading shared libraries: libgl2ps.so.1: cannot open shared object file: No such file or directory


I just created a link into the lib64 library directory and things were fine afterward.

Version check?  Eh, on second thought it would end up being cruft.  On the other hand, it might be nice to have a list of "won't be fixed" bugs associated with the Octave webpage, specifically in the "report a bug" section.  That list would be static and really wouldn't need to be maintained other than adding to the end of the list, something like


DATE | ISSUE                  | PROBLEM        | SOLUTION
-----------------------------------------------------------
XYX  | Printed images missing | gl2ps < V1.3.8 | Upgrade
     | or improperly oriented | has scale bug  | gl2ps


Dan Sebald <sebald>
Wed 04 Mar 2015 04:20:58 PM UTC, comment #6: 

I'm going to vote to just let this go.  gl2ps v1.3.6 appears to have been made on 8/14/2011 or 3.5 years ago.  All distributions which will be compiling the new Octave 4.0 will be using an up-to-date version of gl2ps.  If someone is using a very old stable release, such as Red Hat Enterprise Linux, then I think we can make the user responsible for getting modern versions of libraries.  If you want to code a warning at configure time I think that would be an okay thing too, I just don't feel the need myself.

Rik <rik5>
Group administrator
Wed 04 Mar 2015 05:55:35 AM UTC, comment #5: 

Here is the important difference between the two EPS files:


131c131
< 5 5 scale
---
> 446.40 -352.08 scale


It's a bug in gl2ps.  gl2ps 1.3.5 and 1.3.6 are in sourcecodebrowser and I verified the error.  A scaling by zoom_<dir> was missing.

I guess the options are:

1) Require gl2ps 1.3.6 or greater during configure process.  (Check for GL2PS_MAJOR_VERSION, GL2PS_MINOR_VERSION and GL2PS_PATCH_VERSION)

2) Issue a first-time-after-startup print warning for images if the gl2ps version is less than 1.3.6.  E.g., "Warning, upgrade GL2PS to Version 1.3.6 for correct image printing."  The user will still be able to plot other things.

3) Let it go.

I'm fine with any of those.  Right now I prefer for gnuplot printing anyway.

Dan Sebald <sebald>
Wed 04 Mar 2015 04:42:06 AM UTC, comment #4: 

Works for me.  See the attached file imagetest.working.eps.  This was made with gl2ps v1.3.6-1.

(file #33241)

Rik <rik5>
Group administrator
Wed 04 Mar 2015 12:49:41 AM UTC, comment #3: 

Actually, the version of gl2ps might be the most important.  I have 1.3.5-1.

Dan Sebald <sebald>
Tue 03 Mar 2015 11:21:48 PM UTC, comment #2: 

Post the EPS file, please...

Dan Sebald <sebald>
Tue 03 Mar 2015 10:47:16 PM UTC, comment #1: 

The resulting plot is fine for me.  This is with ghostscript 9.05 and


parent: 19896:0e0a3bbe142f tip
 Canvas.cc: Replace tabs with spaces.


Rik <rik5>
Group administrator
Tue 03 Mar 2015 09:45:48 PM UTC, original submission:  

Images aren't placed in PostScript file correctly.  From these commands:


graphics_toolkit ('fltk');
figure();
image(32*rand(5));
print -depsc imagetest.eps


I get the resulting attached EPS file.  Note that the image is not scale properly and the coordinate system may not be correct.  The plot coordinate system for images may be top/left-to-bottom/right, the included image looks to assume the Cartesian coordinate system, i.e., bottom/left-to-top-right.

Dan Sebald <sebald>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #33241:  imagetest.working.eps added by rik5 (6KiB - application/postscript)
file #33237:  imagetest.eps added by sebald (6KiB - application/postscript)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by sebald (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-03-04 rik5 StatusWorks For Me Wont Fix
        Open/ClosedOpen Closed
    2015-03-04 rik5 Attached File- Added imagetest.working.eps, #33241
    2015-03-03 rik5 StatusNone Works For Me
    2015-03-03 sebald Attached File- Added imagetest.eps, #33237

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code