Back to index

plt-scheme  4.2.1
ps.h
Go to the documentation of this file.
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 /* top level declarations */
00010 
00011 #define LINELENGTH      78
00012 #define COPIES          1
00013 #define XSIZE           540        /* 7.5 x 10 [inches]    */
00014 #define YSIZE           720        /* (72 points = 1 inch) */
00015 #define ENLARGE         5
00016 #define XPSSIZE         ENLARGE*XSIZE
00017 #define YPSSIZE         ENLARGE*YSIZE
00018 #define XOFFSET         32         /* Margins --     */
00019 #define YOFFSET         32         /* .5 inches each */
00020 #define PSX             XPSSIZE-1
00021 #define PSY             YPSSIZE-1
00022 #define OF           pls->OutFile
00023 #define MIN_WIDTH    1             /* Minimum pen width */
00024 #define MAX_WIDTH    30            /* Maximum pen width */
00025 #define DEF_WIDTH    3             /* Default pen width */
00026 
00027 /* These are for covering the page with the background color */
00028 
00029 #define XMIN         -XOFFSET*ENLARGE
00030 #define XMAX         PSX+XOFFSET*ENLARGE
00031 #define YMIN         -XOFFSET*ENLARGE
00032 #define YMAX         PSY+XOFFSET*ENLARGE
00033 
00034 /* Struct to hold device-specific info. */
00035 
00036 typedef struct {
00037     PLFLT pxlx, pxly;
00038     PLINT xold, yold;
00039 
00040     PLINT xmin, xmax, xlen;
00041     PLINT ymin, ymax, ylen;
00042 
00043     PLINT xmin_dev, xmax_dev, xlen_dev;
00044     PLINT ymin_dev, ymax_dev, ylen_dev;
00045 
00046     PLFLT xscale_dev, yscale_dev;
00047 
00048     int llx, lly, urx, ury, ptcnt;
00049 } PSDev;
00050 
00051 void plD_init_pstex         (PLStream *);
00052 void plD_line_pstex         (PLStream *, short, short, short, short);
00053 void plD_polyline_pstex            (PLStream *, short *, short *, PLINT);
00054 void plD_eop_pstex          (PLStream *);
00055 void plD_bop_pstex          (PLStream *);
00056 void plD_tidy_pstex         (PLStream *);
00057 void plD_state_pstex        (PLStream *, PLINT);
00058 void plD_esc_pstex          (PLStream *, PLINT, void *);
00059 
00060 void plD_init_psm           (PLStream *);
00061 void plD_init_psc           (PLStream *);
00062 void plD_line_ps            (PLStream *, short, short, short, short);
00063 void plD_polyline_ps         (PLStream *, short *, short *, PLINT);
00064 void plD_eop_ps                     (PLStream *);
00065 void plD_bop_ps                    (PLStream *);
00066 void plD_tidy_ps            (PLStream *);
00067 void plD_state_ps            (PLStream *, PLINT);
00068 void plD_esc_ps                    (PLStream *, PLINT, void *);
00069 
00070 #endif /* __PS_H__ */