|
From: Ethan A M. <merritt@u.washington.edu> - 2006-12-18 04:45:02
|
On Sunday 17 December 2006 20:12, m sutton wrote:
> >
> > Did you find a specific place where this is not already being done?
> >
>
> Here is a little patch for gd.trm to help keep the character info syncronized.
Do you have an actual demo bug that this patch fixes?
I don't follow why these changes necessary or desirable.
No text has been printed by either of the code segments you are
modifying, so I don't see why it is correct to update the variables
holding the last font used. After all, the font could easily
change again before the next text is printed. Setting the font
is different from writing a string.
>
> Index: gd.trm
> ===================================================================
> RCS file: /cvsroot/gnuplot/gnuplot/term/gd.trm,v
> retrieving revision 1.100
> diff -u -r1.100 gd.trm
> --- gd.trm 9 Dec 2006 19:32:44 -0000 1.100
> +++ gd.trm 18 Dec 2006 04:09:42 -0000
> @@ -941,6 +941,8 @@
> if (!err) {
> term->h_char = .11 * (float)(brect[2] - brect[0]) + 0.5;
> term->v_char = 1.1 * (float)(brect[1] - brect[7]) + 0.5;
> + png_state.charw=term->h_char;
> + png_state.charh=term->v_char;
> }
> }
> #endif
> @@ -1741,6 +1743,8 @@
> if (!err) {
> term->h_char = .11 * (float)(brect[2] - brect[0]) + 0.5;
> term->v_char = 1.1 * (float)(brect[1] - brect[7]) + 0.5;
> + png_state.charw=term->h_char;
> + png_state.charh=term->v_char;
> }
> }
> #endif
>
>
--
Ethan A Merritt
Biomolecular Structure Center
University of Washington, Seattle 98195-7742
|