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;
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__
PLINT ymin
Definition: ps.h:44
void plD_polyline_ps(PLStream *, short *, short *, PLINT)
Definition: ps.c:479
void plD_init_psc(PLStream *)
const Unicode_to_Type1_table * lookup
Definition: ps.h:54
PLINT yold
Definition: ps.h:41
void plD_esc_psttf(PLStream *, PLINT, void *)
Definition: psttf.cc:733
void plD_state_pstex(PLStream *, PLINT)
PLFLT pxly
Definition: ps.h:40
void plD_init_psttf(PLStream *)
void plD_init_ps(PLStream *)
void plD_esc_ps(PLStream *, PLINT, void *)
Definition: ps.c:656
void plD_tidy_pstex(PLStream *)
PLINT xmin
Definition: ps.h:43
void plD_polyline_psttf(PLStream *, short *, short *, PLINT)
Definition: psttf.cc:542
void plD_tidy_psttf(PLStream *)
Definition: psttf.cc:620
void plD_tidy_ps(PLStream *)
Definition: ps.c:555
void plD_line_ps(PLStream *, short, short, short, short)
Definition: ps.c:421
int PLINT
Definition: plplot.h:181
PLINT xmin_dev
Definition: ps.h:46
void plD_init_psttfc(PLStream *)
void plD_state_ps(PLStream *, PLINT)
Definition: ps.c:601
void plD_state_psttf(PLStream *, PLINT)
Definition: psttf.cc:677
FILE * fp
Definition: ps.h:59
int ury
Definition: ps.h:51
void plD_init_pstex(PLStream *)
PLINT ymin_dev
Definition: ps.h:47
void plD_line_psttf(PLStream *, short, short, short, short)
Definition: psttf.cc:483
void plD_bop_pstex(PLStream *)
long cur_pos
Definition: ps.h:58
void plD_bop_psttf(PLStream *)
Definition: psttf.cc:571
Definition: ps.h:38
void plD_bop_ps(PLStream *)
Definition: ps.c:507
void plD_polyline_pstex(PLStream *, short *, short *, PLINT)
int nlookup
Definition: ps.h:53
void plD_eop_ps(PLStream *)
Definition: ps.c:494
void plD_line_pstex(PLStream *, short, short, short, short)
float PLFLT
Definition: plplot.h:163
PLFLT yscale_dev
Definition: ps.h:49
void plD_eop_psttf(PLStream *)
Definition: psttf.cc:557
void plD_esc_pstex(PLStream *, PLINT, void *)
void plD_eop_pstex(PLStream *)