PLplot
5.10.0
|
00001 // 00002 // These definitions are for the Postscript (ps.c) and 00003 // Postscript/LaTeX (pstex.c) drivers 00004 // 00005 00006 #ifndef __PS_H__ 00007 #define __PS_H__ 00008 00009 #include "plunicode-type1.h" 00010 00011 // top level declarations 00012 00013 #define LINELENGTH 78 00014 #define COPIES 1 00015 #define XSIZE (int) ( pls->xlength * ( pls->xdpi / 72. ) ) 00016 #define YSIZE (int) ( pls->ylength * ( pls->ydpi / 72. ) ) 00017 #define ENLARGE 5 00018 #define XPSSIZE ENLARGE * XSIZE 00019 #define YPSSIZE ENLARGE * YSIZE 00020 #define XOFFSET (int) ( pls->xoffset * ( pls->xdpi / 72. ) ) // Margins -- 00021 #define YOFFSET (int) ( pls->yoffset * ( pls->ydpi / 72. ) ) // .5 inches each 00022 #define PSX XPSSIZE - 1 00023 #define PSY YPSSIZE - 1 00024 #define OF pls->OutFile 00025 #define MIN_WIDTH 1. // Minimum pen width 00026 #define MAX_WIDTH 30. // Maximum pen width 00027 #define DEF_WIDTH 3. // Default pen width 00028 00029 // These are for covering the page with the background color 00030 00031 #define XMIN -XOFFSET * ENLARGE 00032 #define XMAX PSX + XOFFSET * ENLARGE 00033 #define YMIN -XOFFSET * ENLARGE 00034 #define YMAX PSY + XOFFSET * ENLARGE 00035 00036 // Struct to hold device-specific info. 00037 00038 typedef struct 00039 { 00040 PLFLT pxlx, pxly; 00041 PLINT xold, yold; 00042 00043 PLINT xmin, xmax, xlen; 00044 PLINT ymin, ymax, ylen; 00045 00046 PLINT xmin_dev, xmax_dev, xlen_dev; 00047 PLINT ymin_dev, ymax_dev, ylen_dev; 00048 00049 PLFLT xscale_dev, yscale_dev; 00050 00051 int llx, lly, urx, ury, ptcnt; 00052 // font variables. 00053 int nlookup, if_symbol_font; 00054 const Unicode_to_Type1_table *lookup; 00055 00056 // These are only used by the pstex driver for the additional 00057 // file required in this case 00058 long cur_pos; 00059 FILE *fp; 00060 } PSDev; 00061 00062 void plD_init_pstex( PLStream * ); 00063 void plD_line_pstex( PLStream *, short, short, short, short ); 00064 void plD_polyline_pstex( PLStream *, short *, short *, PLINT ); 00065 void plD_eop_pstex( PLStream * ); 00066 void plD_bop_pstex( PLStream * ); 00067 void plD_tidy_pstex( PLStream * ); 00068 void plD_state_pstex( PLStream *, PLINT ); 00069 void plD_esc_pstex( PLStream *, PLINT, void * ); 00070 00071 void plD_init_psm( PLStream * ); 00072 void plD_init_psc( PLStream * ); 00073 void plD_line_ps( PLStream *, short, short, short, short ); 00074 void plD_polyline_ps( PLStream *, short *, short *, PLINT ); 00075 void plD_eop_ps( PLStream * ); 00076 void plD_bop_ps( PLStream * ); 00077 void plD_tidy_ps( PLStream * ); 00078 void plD_state_ps( PLStream *, PLINT ); 00079 void plD_esc_ps( PLStream *, PLINT, void * ); 00080 00081 void plD_init_psttfm( PLStream * ); 00082 void plD_init_psttfc( PLStream * ); 00083 void plD_line_psttf( PLStream *, short, short, short, short ); 00084 void plD_polyline_psttf( PLStream *, short *, short *, PLINT ); 00085 void plD_eop_psttf( PLStream * ); 00086 void plD_bop_psttf( PLStream * ); 00087 void plD_tidy_psttf( PLStream * ); 00088 void plD_state_psttf( PLStream *, PLINT ); 00089 void plD_esc_psttf( PLStream *, PLINT, void * ); 00090 00091 #endif // __PS_H__