|
From: Ethan A M. <merritt@u.washington.edu> - 2009-02-12 16:46:36
|
On Thursday 12 February 2009, Ben Abbott wrote: > To properly interpret the "size" information I'll get from x11 using > the GPVAL_TERM_WINDOWID, I'll need the value for GPVAL_TERM_VCHAR. > Temporarily I can assume it is 13 pixels. However, as I'll be using > the window size obtained from x11 to determine if the mouse was used > to change its size, and subsequently update the figures' size property > on the octave end, I'd like to make sure I get his correct. Use it for what? TERM_VCHAR is telling you about the font size, not the window size. And in the case of the x11 terminal, it is only a rough approximation. The current code happens to use vchar and hchar also to estimate the aspect ratio of the window, but this works very poorly. Because of this, the aspect ratio code is still broken in x11 and I think will not be fixable unless/until we totally revise how the x11 terminal coordinates are handled. This will need a careful overhaul of the terminalcode, but I don't see any intrinsic difficulties to overcome. The idea is that the x11 terminal coordinate space should be defined in terms of the actual dimensions of the display window; resizing the window would change term->xmax and term->ymax but leave the x and y scales unchanged. Currently the opposite is true; xmax and ymax are held constant, while the x and y scale are changed so that the current window area is spanned by a coordinate space running from [0:4095] on both x and y. I don't know whether such a revision is relevant to your current project or not. -- Ethan A Merritt |