|
From: sfeam (E. Merritt) <eam...@gm...> - 2012-09-26 04:32:07
|
On Saturday, 22 September 2012, Dima Kogan <gn...@di...> wrote: > > I tackled the long-standing issue of the x11 terminal not respecting the > requested plot aspect ratio. There have been many bugs about this on the > tracker. The main one appears to be > > http://sourceforge.net/tracker/index.php?func=detail&aid=3331162&group_id=2055&atid=102055 > > I have a branch that handles this issue similar to the way the wxt > terminal does: > > - inboard driver computes a particular x,y scale factors > - terminal ALWAYS respects this aspect ratio > - resizing the window does NOT touch the aspect ratio > - a replot is required to re-compute the scale factors > > Similar to the qt terminal, I added a replot-on-resize option to make > things 'just work', at the expense of some extra cpu cycles. > > The code works for my test cases, but I had to touch enough stuff to > make me concerned about cases that I missed. How are such changes > tested, usually? I didn't see a test suite. Hi Dima. I've applied your patch to CVS in the development branch after review and testing. This is a great addition. Thanks so much! I made some trivial code changes to conform to coding style and wrapped the relevant sections with #ifdef X11 so that it does not affect builds for non-X11 systems. Also I flipped the default to "replotonresize", because at least for me the speed penalty on resizing is negligible, while the benefit is clear. The only actual logic change I made was to restore the previous on_event() code for terminals other than x11. I.e., it now reads #ifdef X11 if (!strcmp(term->name,"x11")) { /* New code */ } else #endif /* Old code */ Now to go close some old, old feature requests and bug tracker entries. Ethan |