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

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

[Octave-bug-tracker] [bug #35329] change of paperorientation does not up


From: Rik
Subject: [Octave-bug-tracker] [bug #35329] change of paperorientation does not update papersize
Date: Sun, 22 Jan 2012 20:10:40 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20100101 Firefox/5.0

Follow-up Comment #2, bug #35329 (project octave):

What needs to be done in the C++ code?  Do you want to add a permanent
listener on "paperorientation" that updates papersize?

Just brainstorming, is the following approximately what you are after?


function orientation_listen (h, dummy)

  papersize = get (h, "papersize");
  paperorientation = get (h, "paperorientation");
  if ((papersize(1) > papersize(2) && strcmp (paperorientation, "portrait"))
      || (papersize(1) < papersize(2) && strcmp (paperorientation,
"landscape")))
    set (h, "papersize", papersize([2, 1]));
    paperposition = get (h, "paperposition");
    set (h, "paperposition", paperposition([2, 1, 4, 3]));
  endif

endfunction

addlistener (gcf, "paperorientation", @orientation_listen);




    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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