|
From: Tatsuro M. <tma...@ya...> - 2009-12-09 00:00:11
|
Hello
Thank you for your immediate response.
I have apply your patch to the cvs source and tested on MinGW.
Your patch makes the test goes well.
Thanks!!
Regards
Tatsuro
--- Ethan Merritt wrote:
> On Monday 07 December 2009 20:56:28 Tatsuro MATSUOKA wrote:
> > Hello
> >
> > I have tested the following script
> >
> > set term emf enh
> > set ylabel 'y label a^{-1}'
> > set out 'ylabel.emf'
> > plot sin(x)
> > set out
> >
> > gnuplot> set term emf enh
> > Terminal type set to 'emf'
> > Options are 'color dashed "Arial" 12 enhanced '
> > gnuplot> set ylabel 'y label a^{-1}'
> > gnuplot> set out 'ylabel.emf'
> > gnuplot> plot sin(x)
> > warning: emf_move: (-360,10421) out of range
> > gnuplot> set out
> >
> >
> > warning: emf_move: (-360,10421) out of range
>
> I confirm this.
> It is a general problem with emf, not specific to windows.
>
> The enhanced text mode is ignoring text rotation when it does
> left/right/center justification. The text placement is
> always incorrect when the text is both rotated and enhanced.
>
> The attached patch is better than the current code, but it is only
> an approximation to the correct placement. I do not know how to
> do a more complete treatment of rotation + justification in emf.
>
> Ethan
>
>
>
> > result graph is
> > http://www.geocities.jp/tmgpltwin/Files/Files.html#0040
> > 0040 ylabel_emf_enh.png
> >
> > The above confirmed 4.5 on MinGW and cygwin (changelog 2009-12-05) and gnuplot 4.4rc1(windows
> by
> > Petr) .
> >
> >
> > If I do not use a^{-1}, ylabel is located in proper position.
> >
> > Regards
> >
> > Tatsuro
> > --- gnuplot/term/emf.trm 2009-09-17 08:51:22.000000000 -0700
> +++ gnuplot-cvs/term/emf.trm 2009-12-08 10:47:53.000000000 -0800
> @@ -1583,15 +1583,23 @@ ENHemf_put_text(unsigned int x, unsigned
> ENHemf_font = emf_fontname;
> ENHemf_fontsize = emf_fontsize;
>
> + /* EAM -FIXME
> + * To do proper justification requires some way to track the current position
> + * after writing a text fragment. I don't know how to do that in emf.
> + * So I punt by just estimating the total length.
> + */
> if (emf_justify == RIGHT) {
> - EMF_MoveToEx(x - term->h_char * len, term->ymax-y);
> - EMF_move(x - EMF_AVG_WID * term->h_char * len, y);
> + EMF_move(
> + x - term->h_char * len * cos(emf_vert_text * EMF_10THDEG2RAD),
> + y - term->h_char * len * sin(emf_vert_text * EMF_10THDEG2RAD)
> + );
> } else if (emf_justify == CENTRE) {
> - EMF_MoveToEx(x - term->h_char * len/2, term->ymax-y);
> - EMF_move(x - EMF_AVG_WID * term->h_char * len/2, y);
> + EMF_move(
> + x - term->h_char * len/2 * cos(emf_vert_text * EMF_10THDEG2RAD),
> + y - term->h_char * len/2 * sin(emf_vert_text * EMF_10THDEG2RAD)
> + );
> } else {
> - EMF_MoveToEx(x, term->ymax-y);
> - EMF_move(x, y);
> + EMF_move( x, y);
> }
>
> emf_justify = LEFT;
>
--------------------------------------
Get Disney character's mail address on Yahoo! Mail
http://pr.mail.yahoo.co.jp/disney/
|