Update of /cvsroot/plplot/plplot/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23902
Modified Files:
plpage.c
Log Message:
Change default character height when the -ori option is used. Fixes big font
problems with -ori 1. Checked with ps, xwin and png drivers. Please test on
your favourite driver / orientations.
Index: plpage.c
===================================================================
RCS file: /cvsroot/plplot/plplot/src/plpage.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- plpage.c 17 Jan 2004 16:41:40 -0000 1.27
+++ plpage.c 23 Mar 2005 11:52:31 -0000 1.28
@@ -134,7 +134,7 @@
void
plP_subpInit(void)
{
- PLFLT scale, size_chr, size_sym, size_maj, size_min;
+ PLFLT scale, size_chr, size_sym, size_maj, size_min, theta, rat;
/* Subpage checks */
@@ -158,6 +158,16 @@
((plsc->phyxma - plsc->phyxmi) / plsc->xpmm +
(plsc->phyyma - plsc->phyymi) / plsc->ypmm) / 200.0;
+ /* Take account of scaling caused by change of orientation */
+ if (plsc->difilt && PLDI_ORI) {
+ theta = 0.5*M_PI*plsc->diorot;
+ rat = ( (plsc->phyxma - plsc->phyxmi) / plsc->xpmm ) /
+ ( (plsc->phyyma - plsc->phyymi) / plsc->ypmm );
+ rat = MAX(rat,1.0/rat);
+ rat = fabs(cos(theta)) + rat*fabs(sin(theta));
+ scale /= rat;
+ }
+
if (plsc->nsuby > 1)
scale /= sqrt((double) plsc->nsuby);
|