|
From: Ethan M. <merritt@u.washington.edu> - 2011-02-11 01:16:15
|
> The problem of the enhanced text positioning is fixed with the patch > suggested at > http://article.gmane.org/gmane.comp.graphics.gnuplot.devel/9905 > which still applies for the 2011-01-25 CVS snapshot. > > benjamin > I woul d be happy to apply this patch if it indeed fixes a problem for Windows users. I must say, however, that I do not understand the logic behind the patch. The existing code in win.trm looks correct to me, as it is parallel to code that is demonstrably correct in other terminal drivers. Maybe I am misunderstanding what is returned by the routine GraphGetTextLength(). I would have thought that it would return the bounding rectangle for the text in absolute units (~pixels) with 0,0 at the lower left and (xmax,ymax) at the upper right. (That's what the analagous routine does in libgd). But in that case modifying the code to scale the bounding rectangle by the terminal width and height makes no sense. Does it not have the effect of expanding every text fragment to fill the whole screen? If the coordinates returned by GraphGetTextLength() are non-uniform, then I could understand needing to correct the extent along y by the aspect ratio: width = cos(WIN_angle) * len; height = sin(WIN_ANGLE) * len; height *= graphwin.xmax/graphwin.ymax; But that is different from what the patch does. Am I reading this wrong? -- Ethan A Merritt Biomolecular Structure Center, K-428 Health Sciences Bldg University of Washington, Seattle 98195-7742 |