version 1.1.1.2, 2000/01/22 14:16:28 |
version 1.1.1.3, 2003/09/15 07:09:38 |
Line 106 TERM_PUBLIC void PS_pointsize __PROTO((double ptsize)) |
|
Line 106 TERM_PUBLIC void PS_pointsize __PROTO((double ptsize)) |
|
#ifdef TERM_BODY |
#ifdef TERM_BODY |
/* PostScript driver by Russell Lang, rjl@monu1.cc.monash.edu.au */ |
/* PostScript driver by Russell Lang, rjl@monu1.cc.monash.edu.au */ |
|
|
/* From version.c */ |
|
extern char version[]; |
|
extern char patchlevel[]; |
|
|
|
#define PS_FLUSH_PATH \ |
#define PS_FLUSH_PATH \ |
if (ps_path_count) { fprintf(gpoutfile, "stroke "); ps_path_count = 0; } |
if (ps_path_count) { fprintf(gpoutfile, "stroke "); ps_path_count = 0; } |
|
|
Line 167 static char GPFAR * GPFAR PS_header[] = { |
|
Line 163 static char GPFAR * GPFAR PS_header[] = { |
|
"/AL { stroke userlinewidth 2 div setlinewidth } def\n", |
"/AL { stroke userlinewidth 2 div setlinewidth } def\n", |
/* set user defined linewidth */ |
/* set user defined linewidth */ |
"/UL { dup gnulinewidth mul /userlinewidth exch def\n", |
"/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 */ |
/* Plot Lines */ |
"/PL { stroke userlinewidth setlinewidth } def\n", |
"/PL { stroke userlinewidth setlinewidth } def\n", |
/* Line Types */ |
/* Line Types */ |
Line 444 static char GPFAR * GPFAR PS_header[] = { |
|
Line 440 static char GPFAR * GPFAR PS_header[] = { |
|
/* filled box : usage x1 y1 x2 y2 BoxFill */ |
/* filled box : usage x1 y1 x2 y2 BoxFill */ |
"/BoxFill { gsave Rec 1 setgray fill grestore } def\n", |
"/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 |
NULL |
}; |
}; |
|
|
Line 498 int can_reencode; |
|
Line 500 int can_reencode; |
|
return NULL; |
return NULL; |
|
|
/* we did not find the name */ |
/* we did not find the name */ |
|
|
fnp = (struct PS_FontName *)gp_alloc(sizeof(struct PS_FontName), "PostScript Font record"); |
fnp = (struct PS_FontName *)gp_alloc(sizeof(struct PS_FontName), |
fnp->name = gp_alloc(1+strlen(fname), "PostScript Font name"); |
"PostScript Font record"); |
strcpy(fnp->name, fname); |
fnp->name = gp_strdup(fname); |
fnp->next = PS_DocFonts; |
fnp->next = PS_DocFonts; |
PS_DocFonts = fnp; |
PS_DocFonts = fnp; |
|
|
Line 649 static int ps_common_uses_fonts; |
|
Line 651 static int ps_common_uses_fonts; |
|
static unsigned int ps_common_xoff, ps_common_yoff; |
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) |
TERM_PUBLIC void |
int encap; /* encapsulated or not - 1 for pslatex */ |
PS_common_init(encap, portrait, uses_fonts, xoff, yoff, bb_xmin, bb_ymin, bb_xmax, bb_ymax, dict) |
int portrait; /* 1 for pslatex */ |
int encap; /* encapsulated or not - 1 for pslatex */ |
int uses_fonts; /* 0 for ps(la)tex */ |
int portrait; /* 1 for pslatex */ |
unsigned int xoff, yoff; /* how much to translate by */ |
int uses_fonts; /* 0 for ps(la)tex */ |
unsigned int bb_xmin, bb_ymin, bb_xmax, bb_ymax; /* bounding box */ |
unsigned int xoff, yoff; /* how much to translate by */ |
char **dict; /* extra entries for the dictionary */ |
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\ |
static char GPFAR psi1[] = "%%%%Creator: gnuplot %s patchlevel %s\n\ |
%%%%CreationDate: %s\ |
%%%%CreationDate: %s\ |
|
|
|
|
if (outstr) fprintf(gpoutfile, "%%%%Title: %s\n", outstr ); /* JFi */ |
if (outstr) fprintf(gpoutfile, "%%%%Title: %s\n", outstr ); /* JFi */ |
time(&now); |
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) |
if (!encap) |
fprintf(gpoutfile,"%%%%Pages: (atend)\n"); |
fprintf(gpoutfile,"%%%%Pages: (atend)\n"); |
Line 932 TERM_PUBLIC void PS_graphics() |
|
Line 939 TERM_PUBLIC void PS_graphics() |
|
{ |
{ |
static char GPFAR psg1[] = "0 setgray\nnewpath\n"; |
static char GPFAR psg1[] = "0 setgray\nnewpath\n"; |
struct termentry *t = term; |
struct termentry *t = term; |
|
|
ps_page++; |
ps_page++; |
if (!ps_common_encap) |
if (!ps_common_encap) |
fprintf(gpoutfile,"%%%%Page: %d %d\n",ps_page,ps_page); |
fprintf(gpoutfile,"%%%%Page: %d %d\n",ps_page,ps_page); |
fprintf(gpoutfile,"gnudict begin\ngsave\n"); |
fprintf(gpoutfile,"gnudict begin\ngsave\n"); |
fprintf(gpoutfile,"%d %d translate\n",ps_common_xoff, ps_common_yoff); |
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, |
fprintf(gpoutfile,"%.3f %.3f scale\n", (ps_common_encap ? 0.5 : 1.0)/PS_SC, |
(ps_eps ? 0.5 : 1.0)/PS_SC); |
(ps_common_encap ? 0.5 : 1.0)/PS_SC); |
if (!ps_common_portrait) { |
if (!ps_common_portrait) { |
fprintf(gpoutfile,"90 rotate\n0 %d translate\n", (int)(-PS_YMAX)); |
fprintf(gpoutfile,"90 rotate\n0 %d translate\n", (int)(-PS_YMAX)); |
} |
} |
Line 1762 START_HELP(post) |
|
Line 1770 START_HELP(post) |
|
" Braces can be used to place multiple-character text where a single character", |
" 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", |
" 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", |
" 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", |
" is currently in effect. (The '/' character MUST be the first character after", |
" the '{'.)", |
" the '{'.)", |
"", |
"", |