PLplot: ps.h Source File

PLplot 5.15.0

ps.h
Go to the documentation of this file.
1 //
2 // These definitions are for the Postscript (ps.c) and
3 // Postscript/LaTeX (pstex.c) drivers
4 //
5
6 #ifndef __PS_H__
7 #define __PS_H__
8
9 #include "plunicode-type1.h"
10
11 // top level declarations
12
13 #define LINELENGTH 78
14 #define COPIES 1
15 #define XSIZE (int) ( pls->xlength * ( pls->xdpi / 72. ) )
16 #define YSIZE (int) ( pls->ylength * ( pls->ydpi / 72. ) )
17 #define ENLARGE 5
18 #define XPSSIZE ENLARGE * XSIZE
19 #define YPSSIZE ENLARGE * YSIZE
20 #define XOFFSET (int) ( pls->xoffset * ( pls->xdpi / 72. ) ) // Margins --
21 #define YOFFSET (int) ( pls->yoffset * ( pls->ydpi / 72. ) ) // .5 inches each
22 #define PSX XPSSIZE - 1
23 #define PSY YPSSIZE - 1
24 #define OF pls->OutFile
25 #define MIN_WIDTH 1. // Minimum pen width
26 #define MAX_WIDTH 30. // Maximum pen width
27 #define DEF_WIDTH 3. // Default pen width
28
29 // These are for covering the page with the background color
30
31 #define XMIN -XOFFSET * ENLARGE
32 #define XMAX PSX + XOFFSET * ENLARGE
33 #define YMIN -XOFFSET * ENLARGE
34 #define YMAX PSY + XOFFSET * ENLARGE
35
36 // Struct to hold device-specific info.
37
38 typedef struct
39 {
40 PLFLT pxlx, pxly;
41 PLINT xold, yold;
42
43 PLINT xmin, xmax, xlen;
44 PLINT ymin, ymax, ylen;
45
46 PLINT xmin_dev, xmax_dev, xlen_dev;
47 PLINT ymin_dev, ymax_dev, ylen_dev;
48
49 PLFLT xscale_dev, yscale_dev;
50
51 int llx, lly, urx, ury, ptcnt;
52 // font variables.
53 int nlookup, if_symbol_font;
54 const Unicode_to_Type1_table *lookup;
55
56 // These are only used by the pstex driver for the additional
57 // file required in this case
58 long cur_pos;
59 FILE *fp;
60 } PSDev;
61
62 void plD_init_pstex( PLStream * );
63 void plD_line_pstex( PLStream *, short, short, short, short );
64 void plD_polyline_pstex( PLStream *, short *, short *, PLINT );
65 void plD_eop_pstex( PLStream * );
66 void plD_bop_pstex( PLStream * );
67 void plD_tidy_pstex( PLStream * );
68 void plD_state_pstex( PLStream *, PLINT );
69 void plD_esc_pstex( PLStream *, PLINT, void * );
70
71 void plD_init_ps( PLStream * );
72 void plD_init_psc( PLStream * );
73 void plD_line_ps( PLStream *, short, short, short, short );
74 void plD_polyline_ps( PLStream *, short *, short *, PLINT );
75 void plD_eop_ps( PLStream * );
76 void plD_bop_ps( PLStream * );
77 void plD_tidy_ps( PLStream * );
78 void plD_state_ps( PLStream *, PLINT );
79 void plD_esc_ps( PLStream *, PLINT, void * );
80
81 void plD_init_psttf( PLStream * );
82 void plD_init_psttfc( PLStream * );
83 void plD_line_psttf( PLStream *, short, short, short, short );
84 void plD_polyline_psttf( PLStream *, short *, short *, PLINT );
85 void plD_eop_psttf( PLStream * );
86 void plD_bop_psttf( PLStream * );
87 void plD_tidy_psttf( PLStream * );
88 void plD_state_psttf( PLStream *, PLINT );
89 void plD_esc_psttf( PLStream *, PLINT, void * );
90
91 #endif // __PS_H__
PSDev::ymin
PLINT ymin
Definition: ps.h:44
plD_polyline_ps
void plD_polyline_ps(PLStream *, short *, short *, PLINT)
Definition: ps.c:479
plD_init_psc
void plD_init_psc(PLStream *)
PSDev::lookup
const Unicode_to_Type1_table * lookup
Definition: ps.h:54
PSDev::yold
PLINT yold
Definition: ps.h:41
plD_esc_psttf
void plD_esc_psttf(PLStream *, PLINT, void *)
Definition: psttf.cc:733
plD_state_pstex
void plD_state_pstex(PLStream *, PLINT)
PSDev::pxly
PLFLT pxly
Definition: ps.h:40
plD_init_psttf
void plD_init_psttf(PLStream *)
plD_init_ps
void plD_init_ps(PLStream *)
plD_esc_ps
void plD_esc_ps(PLStream *, PLINT, void *)
Definition: ps.c:656
plD_tidy_pstex
void plD_tidy_pstex(PLStream *)
PSDev::xmin
PLINT xmin
Definition: ps.h:43
plD_polyline_psttf
void plD_polyline_psttf(PLStream *, short *, short *, PLINT)
Definition: psttf.cc:542
plD_tidy_psttf
void plD_tidy_psttf(PLStream *)
Definition: psttf.cc:620
plD_tidy_ps
void plD_tidy_ps(PLStream *)
Definition: ps.c:555
plD_line_ps
void plD_line_ps(PLStream *, short, short, short, short)
Definition: ps.c:421
PLINT
int PLINT
Definition: plplot.h:181
PSDev::xmin_dev
PLINT xmin_dev
Definition: ps.h:46
plD_init_psttfc
void plD_init_psttfc(PLStream *)
plD_state_ps
void plD_state_ps(PLStream *, PLINT)
Definition: ps.c:601
plD_state_psttf
void plD_state_psttf(PLStream *, PLINT)
Definition: psttf.cc:677
Unicode_to_Type1_table
Definition: plunicode-type1.h:30
PSDev::fp
FILE * fp
Definition: ps.h:59
PSDev::ury
int ury
Definition: ps.h:51
plD_init_pstex
void plD_init_pstex(PLStream *)
PSDev::ymin_dev
PLINT ymin_dev
Definition: ps.h:47
plD_line_psttf
void plD_line_psttf(PLStream *, short, short, short, short)
Definition: psttf.cc:483
plD_bop_pstex
void plD_bop_pstex(PLStream *)
PSDev::cur_pos
long cur_pos
Definition: ps.h:58
plD_bop_psttf
void plD_bop_psttf(PLStream *)
Definition: psttf.cc:571
PSDev
Definition: ps.h:38
plD_bop_ps
void plD_bop_ps(PLStream *)
Definition: ps.c:507
plD_polyline_pstex
void plD_polyline_pstex(PLStream *, short *, short *, PLINT)
PLStream
Definition: plstrm.h:523
PSDev::nlookup
int nlookup
Definition: ps.h:53
plD_eop_ps
void plD_eop_ps(PLStream *)
Definition: ps.c:494
plunicode-type1.h
plD_line_pstex
void plD_line_pstex(PLStream *, short, short, short, short)
PLFLT
float PLFLT
Definition: plplot.h:163
PSDev::yscale_dev
PLFLT yscale_dev
Definition: ps.h:49
plD_eop_psttf
void plD_eop_psttf(PLStream *)
Definition: psttf.cc:557
plD_esc_pstex
void plD_esc_pstex(PLStream *, PLINT, void *)
plD_eop_pstex
void plD_eop_pstex(PLStream *)