|
From: Bastian M. <bma...@we...> - 2006-04-04 19:25:21
|
Ethan Merritt wrote:
> On Tuesday 04 April 2006 11:23 am, Chris K wrote:
>=20
> I'll have a look at the rest of your comments later, but for this one..=
=2E
>=20
>> The usual enhanced_recursion calls will need feedback about the text l=
ayout size
>> from the terminal driver.
>=20
> I don't think this is true. Could you give a specific example?
> For instance, the postscript driver itself knows little about text
> layout. That information is not available until much later, when
> the output file is run through a postscript interpreter=20
> (e.g. a PostScript printer, ghostscript). By then it is far to late
> to feed any information back to the gnuplot core routines.
I think that this is only true for postscript. win.trm and pm.trm both
need to know where to write the next piece of text and therefore need
to know the width of the text.
A quick look at gd.trm reveals the following piece of code in ENHGD_put_t=
ext():
/* EAM - Software text justification requires two passes */
if (png_state.justify =3D=3D RIGHT || png_state.justify =3D=3D CENTR=
E)
ENHgd_sizeonly =3D TRUE;
But also for left justified text the gdlib routines return the new positi=
on
after put_text and hence return the size of the text output.
So for most terminals you really need a way to get feedback about the tex=
t layout
size. Postscript is special since the decision about the exact positionin=
g
of enhanced text can (and must) be postponed to when the file is actually=
rendered.
Bastian
--=20
Bastian M=E4rkisch
|