The R Project SVN R

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 r 1
/*
2
 *  R : A Computer Langage for Statistical Data Analysis
3
 *  Copyright (C) 1995, 1996  Robert Gentleman and Ross Ihaka
4
 *
5
 *  This program is free software; you can redistribute it and/or modify
6
 *  it under the terms of the GNU General Public License as published by
7
 *  the Free Software Foundation; either version 2 of the License, or
8
 *  (at your option) any later version.
9
 *
10
 *  This program is distributed in the hope that it will be useful,
11
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 *  GNU General Public License for more details.
14
 *
15
 *  You should have received a copy of the GNU General Public License
16
 *  along with this program; if not, write to the Free Software
17
 *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18
 */
19
 
20
#define BUFSIZE 512
21
 
22
typedef struct {
23
	short FontBBox[4];
24
	short CapHeight;
25
	short XHeight;
26
	short Descender;
27
	short Ascender;
28
	struct {
29
		short WX;
30
		short BBox[4];
31
	} CharInfo[256];
32
} FontMetricInfo;
33
 
34
int    PostScriptLoadFontMetrics(char*, FontMetricInfo*);
35
double PostScriptStringWidth(unsigned char*, FontMetricInfo*);
36
void   PostScriptMetricInfo(int, double*, double*, double*, FontMetricInfo*);
37
void   PostScriptFilledCircle(FILE*, double, double, double);
38
void   PostScriptOpenCircle(FILE*, double, double, double);
39
void   PostScriptEndPage(FILE*);
40
void   PostScriptEndPath(FILE*);
41
void   PostScriptFileHeader(FILE*, char**, char*, double, double, int, double, double, double, double);
42
void   PostScriptFileTrailer(FILE*, int);
43
void   PostScriptLineTo(FILE*, double, double);
44
void   PostScriptMoveTo(FILE*, double, double);
45
void   PostScriptOrientPage(FILE*, int, double, double);
46
void   PostScriptFilledPolygon(FILE*, double*, double*, int);
47
void   PostScriptOpenPolygon(FILE*, double*, double*, int);
48
void   PostScriptFilledRectangle(FILE*, double, double, double, double);
49
void   PostScriptOpenRectangle(FILE*, double, double, double, double);
50
void   PostScriptSetClipRect(FILE*, double, double, double, double);
51
void   PostScriptSetColor(FILE*, double, double, double);
52
void   PostScriptSetFont(FILE*, int, double);
53
void   PostScriptSetLineTexture(FILE*, int*, int);
54
void   PostScriptSetLineWidth(FILE*, double);
55
void   PostScriptStartPage(FILE*, int);
56
void   PostScriptStartPath(FILE*);
57
void   PostScriptText(FILE*, double, double, char*, double, double, double);