|
From: Ethan A M. <merritt@u.washington.edu> - 2006-09-04 23:46:26
|
On Monday 04 September 2006 03:17 pm, Hans-Bernhard Br=F6ker wrote:
>=20
> The core issue is a missing feature: X11 doesn't update its h_tic and=20
> v_tics if the graph window changes size.
No, but it does update them every time a new font takes effect.
Whenever a new font is set, gnuplot_x11 returns the font size information
and the current window size information to the core via this call:
1713: gp_exec_event(GE_fontprops, plot->width, plot->height,
1714: scaled_hchar, scaled_vchar, 0);
=20
This is caught by lines 1890ff in mouse.c:
case GE_fontprops:
term->h_char =3D ge->par1;
term->v_char =3D ge->par2;
/* Update aspect ratio based on current window size */
term->v_tic =3D term->h_tic * (double)ge->mx / (double)ge->my;
/* EAM FIXME - We could also update term->xmax and term->ymax here,=
*/
/* but the existing code doesn't expect it to change. =
*/
break;
Since this code is triggered by a font change, however, it is not
invoked by the "test" command. Arguably the same update should be
triggered by a resize event, but currently it isn't. Nevertheless,
since most real plots set the font at least once, things have
worked well enough in practice.
I still think worrying about the aspect ratio of the test polygon
printed on the terminal "test" page is a waste of time. It would
be much more useful to spend the effort dealing with real bugs in
real plots, except that I don't know of any serious enough to hold
up the 4.2 release.
=2D-=20
Ethan A Merritt
Biomolecular Structure Center
University of Washington, Seattle 98195-7742
|