fe43d5c248b98062cea9137593b4233cd1b3f24c
[alexxy/gromacs.git] / include / writeps.h
1 /*
2  * 
3  *                This source code is part of
4  * 
5  *                 G   R   O   M   A   C   S
6  * 
7  *          GROningen MAchine for Chemical Simulations
8  * 
9  *                        VERSION 3.2.0
10  * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
11  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
12  * Copyright (c) 2001-2004, The GROMACS development team,
13  * check out http://www.gromacs.org for more information.
14
15  * This program is free software; you can redistribute it and/or
16  * modify it under the terms of the GNU General Public License
17  * as published by the Free Software Foundation; either version 2
18  * of the License, or (at your option) any later version.
19  * 
20  * If you want to redistribute modifications, please consider that
21  * scientific software is very special. Version control is crucial -
22  * bugs must be traceable. We will be happy to consider code for
23  * inclusion in the official distribution, but derived work must not
24  * be called official GROMACS. Details are found in the README & COPYING
25  * files - if they are missing, get the official version at www.gromacs.org.
26  * 
27  * To help us fund GROMACS development, we humbly ask that you cite
28  * the papers on the package - you can find them in the top README file.
29  * 
30  * For more info, check our website at http://www.gromacs.org
31  * 
32  * And Hey:
33  * Gromacs Runs On Most of All Computer Systems
34  */
35
36 #ifndef _writeps_h
37 #define _writeps_h
38
39
40 #include <stdio.h>
41 #include "visibility.h"
42 #include "typedefs.h"
43
44 #ifdef __cplusplus
45 extern "C" {
46 #endif
47
48 typedef enum { 
49   eXCenter, eXLeft, eXRight
50 } eXPos;
51
52 typedef enum { 
53   eYCenter, eYTop,  eYBottom
54 } eYPos; 
55
56 enum { 
57   efontTIMES, efontTIMESITALIC, efontTIMESBOLD, efontTIMESBOLDITALIC,
58   efontHELV,  efontHELVITALIC,  efontHELVBOLD,  efontHELVBOLDITALIC,
59   efontCOUR,  efontCOURITALIC,  efontCOURBOLD,  efontCOURBOLDITALIC,
60   efontNR };
61
62
63 typedef struct t_int_psdata *t_psdata;
64 /* Only use t_psdata - it is a pointer to an abstract datatype
65  * that maintains the state of the postscript currently written.
66  */
67
68 extern const char *fontnm[efontNR];
69
70 GMX_LIBGMX_EXPORT
71 t_psdata ps_open(const char *fn,real x1,real y1,real x2,real y2);
72
73 GMX_LIBGMX_EXPORT
74 void ps_linewidth(t_psdata ps,int lw);
75 GMX_LIBGMX_EXPORT
76 void ps_color(t_psdata ps,real r,real g,real b);
77 GMX_LIBGMX_EXPORT
78 void ps_rgb(t_psdata ps,t_rgb *rgb);
79
80 void ps_rgb_box(t_psdata ps,t_rgb *rgb);
81 GMX_LIBGMX_EXPORT
82 void ps_rgb_nbox(t_psdata ps,t_rgb *rgb,real n);
83 GMX_LIBGMX_EXPORT
84 void ps_init_rgb_box(t_psdata ps,real xbox, real ybox);
85 GMX_LIBGMX_EXPORT
86 void ps_init_rgb_nbox(t_psdata ps,real xbox, real ybox);
87
88 void ps_lineto(t_psdata ps,real x,real y);
89 void ps_linerel(t_psdata ps,real dx,real dy);
90
91 GMX_LIBGMX_EXPORT
92 void ps_moveto(t_psdata ps,real x,real y);
93 GMX_LIBGMX_EXPORT
94 void ps_moverel(t_psdata ps,real dx,real dy);
95
96 GMX_LIBGMX_EXPORT
97 void ps_line(t_psdata ps,real x1,real y1,real x2,real y2);
98
99 GMX_LIBGMX_EXPORT
100 void ps_box(t_psdata ps,real x1,real y1,real x2,real y2);
101 GMX_LIBGMX_EXPORT
102 void ps_fillbox(t_psdata ps,real x1,real y1,real x2,real y2);
103
104 void ps_arc(t_psdata ps,real x1,real y1,real rad,real a0,real a1);
105 void ps_fillarc(t_psdata ps,real x1,real y1,real rad,real a0,real a1);
106 GMX_LIBGMX_EXPORT
107 void ps_arcslice(t_psdata ps,real xc,real yc,
108                         real rad1,real rad2,real a0,real a1);
109 GMX_LIBGMX_EXPORT
110 void ps_fillarcslice(t_psdata ps,real xc,real yc,
111                             real rad1,real rad2,real a0,real a1);
112
113 void ps_circle(t_psdata ps,real x1,real y1,real rad);
114
115 GMX_LIBGMX_EXPORT
116 void ps_font(t_psdata ps,int font,real size);
117 GMX_LIBGMX_EXPORT
118 void ps_strfont(t_psdata ps,char *font,real size);
119
120 void ps_text(t_psdata ps,real x1,real y1,const char *str);
121 GMX_LIBGMX_EXPORT
122 void ps_ctext(t_psdata ps,real x1,real y1,const char *str,int expos);
123
124 GMX_LIBGMX_EXPORT
125 void ps_close(t_psdata ps);
126
127 GMX_LIBGMX_EXPORT
128 void ps_flip(t_psdata ps,gmx_bool bPlus);
129 /* Rotate over 90 (bPlus) or -90 (!bPlus) degrees */
130
131 GMX_LIBGMX_EXPORT
132 void ps_rotate(t_psdata ps,real angle);
133
134 GMX_LIBGMX_EXPORT
135 void ps_translate(t_psdata ps,real x,real y);
136
137 GMX_LIBGMX_EXPORT
138 void ps_setorigin(t_psdata ps);
139 GMX_LIBGMX_EXPORT
140 void ps_unsetorigin(t_psdata ps);
141
142 void viewps(char *fn);
143
144 GMX_LIBGMX_EXPORT
145 void ps_comment(t_psdata ps,const char *s);
146
147 #ifdef __cplusplus
148 }
149 #endif
150
151 #endif  /* _writeps_h */
152