On Monday 08 January 2007 14:35, Hans-Bernhard Br=F6ker wrote:
> m sutton wrote:
>=20
> > I did some investigating. I found that the X11, CGM and Postscript
> > enhanced will do vertical centering. PNG (gd), Postscript, and EMF
> > do not do vertical centering.
I think the core code also plays a large role in this.
Here is the top of the routine write_label, in gadgets.c, which
now handles all the labels for both 2D and 3D plots.
write_label(unsigned int x, unsigned int y, struct text_label *this_lab=
el)
{
int htic, vtic;
int justify =3D JUST_TOP; /* This was the 2D default; 3D had CENTRE=
*/
And indeed, already back in 3.7 days graphics.c wrote labels with JUST_TOP
while graph3d.c did not.
I wonder if various drivers may have added ad-hoc vertical positioning
offsets to make up for the fact that the core routine makes the wrong call.
The enhanced text code, however, does not funnel through write_label.
So it is not so surprising that it may produce different centering results.
> At least by intention, that constitutes a bug in the latter three=20
> drivers. The wording is not as clear as it could be, but let's see what=
=20
> the applicable documentation in term/README says this about put_text():
>=20
> _put_text(x,y,str) Called to display text at the (x,y) position,
> while in graphics mode. The text should be vertically (with respect
> to the text) justified about (x,y).
I'm not sure how to interpret that, given that the choice of
vertical justification is made by core routines, not the terminal drivers.
=2D-=20
Ethan A Merritt
Biomolecular Structure Center
University of Washington, Seattle 98195-7742
|