=================================================================== RCS file: /home/cvs/OpenXM_contrib/gnuplot/term/Attic/post.trm,v retrieving revision 1.1.1.2 retrieving revision 1.1.1.3 diff -u -p -r1.1.1.2 -r1.1.1.3 --- OpenXM_contrib/gnuplot/term/Attic/post.trm 2000/01/22 14:16:28 1.1.1.2 +++ OpenXM_contrib/gnuplot/term/Attic/post.trm 2003/09/15 07:09:38 1.1.1.3 @@ -1,5 +1,5 @@ /* - * $Id: post.trm,v 1.1.1.2 2000/01/22 14:16:28 maekawa Exp $ + * $Id: post.trm,v 1.1.1.3 2003/09/15 07:09:38 ohara Exp $ */ /* GNUPLOT - post.trm */ @@ -106,10 +106,6 @@ TERM_PUBLIC void PS_pointsize __PROTO((double ptsize)) #ifdef TERM_BODY /* PostScript driver by Russell Lang, rjl@monu1.cc.monash.edu.au */ -/* From version.c */ -extern char version[]; -extern char patchlevel[]; - #define PS_FLUSH_PATH \ if (ps_path_count) { fprintf(gpoutfile, "stroke "); ps_path_count = 0; } @@ -167,7 +163,7 @@ static char GPFAR * GPFAR PS_header[] = { "/AL { stroke userlinewidth 2 div setlinewidth } def\n", /* set user defined linewidth */ "/UL { dup gnulinewidth mul /userlinewidth exch def\n", -" 10 mul /udl exch def } def\n", +" dup 1 lt {pop 1} if 10 mul /udl exch def } def\n", /* Plot Lines */ "/PL { stroke userlinewidth setlinewidth } def\n", /* Line Types */ @@ -444,6 +440,12 @@ static char GPFAR * GPFAR PS_header[] = { /* filled box : usage x1 y1 x2 y2 BoxFill */ "/BoxFill { gsave Rec 1 setgray fill grestore } def\n", +/* oblique symbol font, e.g. set xlabel 'b' "Symbol-Oblique" + gives an oblique (slanted) beta character */ +"/Symbol-Oblique /Symbol findfont [1 0 .167 1 0 0] makefont\n", +"dup length dict begin {1 index /FID eq {pop pop} {def} ifelse} forall\n", +"currentdict end definefont pop\n", + NULL }; @@ -498,10 +500,10 @@ int can_reencode; return NULL; /* we did not find the name */ - - fnp = (struct PS_FontName *)gp_alloc(sizeof(struct PS_FontName), "PostScript Font record"); - fnp->name = gp_alloc(1+strlen(fname), "PostScript Font name"); - strcpy(fnp->name, fname); + + fnp = (struct PS_FontName *)gp_alloc(sizeof(struct PS_FontName), + "PostScript Font record"); + fnp->name = gp_strdup(fname); fnp->next = PS_DocFonts; PS_DocFonts = fnp; @@ -649,13 +651,15 @@ static int ps_common_uses_fonts; static unsigned int ps_common_xoff, ps_common_yoff; -TERM_PUBLIC void PS_common_init(encap, portrait, uses_fonts, xoff, yoff, bb_xmin, bb_ymin, bb_xmax, bb_ymax, dict) -int encap; /* encapsulated or not - 1 for pslatex */ -int portrait; /* 1 for pslatex */ -int uses_fonts; /* 0 for ps(la)tex */ -unsigned int xoff, yoff; /* how much to translate by */ -unsigned int bb_xmin, bb_ymin, bb_xmax, bb_ymax; /* bounding box */ -char **dict; /* extra entries for the dictionary */ +TERM_PUBLIC void +PS_common_init(encap, portrait, uses_fonts, xoff, yoff, bb_xmin, bb_ymin, bb_xmax, bb_ymax, dict) + int encap; /* encapsulated or not - 1 for pslatex */ + int portrait; /* 1 for pslatex */ + int uses_fonts; /* 0 for ps(la)tex */ + unsigned int xoff, yoff; /* how much to translate by */ + unsigned int bb_xmin, bb_ymin, + bb_xmax, bb_ymax; /* bounding box */ + char **dict; /* extra entries for the dictionary */ { static char GPFAR psi1[] = "%%%%Creator: gnuplot %s patchlevel %s\n\ %%%%CreationDate: %s\ @@ -832,11 +836,14 @@ NULL }; if (outstr) fprintf(gpoutfile, "%%%%Title: %s\n", outstr ); /* JFi */ time(&now); - fprintf(gpoutfile, psi1, version, patchlevel, asctime(localtime(&now)), uses_fonts ? "(atend)" : ""); + fprintf(gpoutfile, psi1, gnuplot_version, gnuplot_patchlevel, + asctime(localtime(&now)), uses_fonts ? "(atend)" : ""); - fprintf(gpoutfile,"%%%%BoundingBox: %d %d %d %d\n", xoff + bb_xmin, yoff + bb_ymin, xoff + bb_xmax, yoff + bb_ymax); + fprintf(gpoutfile,"%%%%BoundingBox: %d %d %d %d\n", xoff + bb_xmin, + yoff + bb_ymin, xoff + bb_xmax, yoff + bb_ymax); - fprintf(gpoutfile,"%%%%Orientation: %s\n", ps_portrait ? "Portrait" : "Landscape"); + fprintf(gpoutfile,"%%%%Orientation: %s\n", + ps_portrait ? "Portrait" : "Landscape"); if (!encap) fprintf(gpoutfile,"%%%%Pages: (atend)\n"); @@ -932,13 +939,14 @@ TERM_PUBLIC void PS_graphics() { static char GPFAR psg1[] = "0 setgray\nnewpath\n"; struct termentry *t = term; + ps_page++; if (!ps_common_encap) fprintf(gpoutfile,"%%%%Page: %d %d\n",ps_page,ps_page); fprintf(gpoutfile,"gnudict begin\ngsave\n"); fprintf(gpoutfile,"%d %d translate\n",ps_common_xoff, ps_common_yoff); - fprintf(gpoutfile,"%.3f %.3f scale\n", (ps_eps ? 0.5 : 1.0)/PS_SC, - (ps_eps ? 0.5 : 1.0)/PS_SC); + fprintf(gpoutfile,"%.3f %.3f scale\n", (ps_common_encap ? 0.5 : 1.0)/PS_SC, + (ps_common_encap ? 0.5 : 1.0)/PS_SC); if (!ps_common_portrait) { fprintf(gpoutfile,"90 rotate\n0 %d translate\n", (int)(-PS_YMAX)); } @@ -1762,7 +1770,7 @@ START_HELP(post) " Braces can be used to place multiple-character text where a single character", " is expected (e.g., 2^{10}). To change the font and/or size, use the full", " form: {/[fontname][=fontsize | *fontscale] text}. Thus {/Symbol=20 G} is a", -" 20-point GAMMA) and {/*0.75 K} is a K at three-quarters of whatever fontsize", +" 20-point GAMMA and {/*0.75 K} is a K at three-quarters of whatever fontsize", " is currently in effect. (The '/' character MUST be the first character after", " the '{'.)", "",