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

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

[Octave-bug-tracker] [bug #52940] Regression with "PaperPosition" and pr


From: Dan Sebald
Subject: [Octave-bug-tracker] [bug #52940] Regression with "PaperPosition" and printing
Date: Tue, 23 Jan 2018 20:40:42 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0

Follow-up Comment #17, bug #52940 (project octave):

OK, I have a patch.  There will be another rev, but Rik please give the
changeset a try.  Before even looking at the plot I knew it would be correct
because the number's I was printing out looked correct, i.e., no more 485 but
always 396.

Finding the location to set the viewport wasn't too bad.  Also, setting the
viewport is pretty much the same as the GLCanvas.  Given the gl2ps_renderer is
derived from opengl_renderer, we can use the same member function.  However,
someone please tell me if there is a better way of getting the desired
parameters (i.e., the 720 and 396) rather than having to get all those figure
properties.  Also, it would be nice to use something other than the Figure's
position because we might then be able to get away from having to do those
contortions on the Figure before calling the gl2ps_renderer.  Is there some
way we can use the PaperSize and still get the same info?  Would be nice.

Something else I did was remove that first "drawnow" at the start of
__opengl_print__.m.  I believe that was covering up this bug.  That is, in
order to get the proper viewport, this drawnow() command was setting up a
viewport in OpenGL memory that later was cleared, but by chance happened to be
in the right memory location so that when the next OpenGL context was created
those viewport settings were correct.  Not a recommended coding technique. 
:-)

Before specifically setting the viewport when I tested the removal of that
drawnow(), FLTK toolkit produced an incorrect result.  But with the attached
changeset, FLTK still looks correct.  Qt should look correct as well.

This may go a long way to fixing a few things that seemed like annoying bugs
in gl2ps and hopefully we can get rid of the on-screen size change.  So, some
feedback, and then I'll make another rev.

(file #43042)
    _______________________________________________________

Additional Item Attachment:

File name: octave-gl2ps_viewport-djs2018jan23.patch Size:1 KB


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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