/[xmakemol]/xmakemol/gl2ps.h
ViewVC logotype

Diff of /xmakemol/gl2ps.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by MPHodges, Sat Sep 6 17:37:25 2003 UTC revision 1.3 by MPHodges, Tue Sep 30 21:36:28 2003 UTC
# Line 1  Line 1 
1    /* $Id$ */
2  /*  /*
3   * GL2PS, an OpenGL to PostScript Printing Library   * GL2PS, an OpenGL to PostScript Printing Library
4   * Copyright (C) 1999-2003 Christophe Geuzaine   * Copyright (C) 1999-2003 Christophe Geuzaine <geuz@geuz.org>
  *  
  * $Id$  
  *  
  * E-mail: geuz@geuz.org  
  * URL: http://www.geuz.org/gl2ps/  
5   *   *
6   * This library is free software; you can redistribute it and/or   * This library is free software; you can redistribute it and/or
7   * modify it under the terms of the GNU Library General Public   * modify it under the terms of the GNU Library General Public
# Line 21  Line 17 
17   * License along with this library; if not, write to the Free   * License along with this library; if not, write to the Free
18   * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.   * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19   *   *
20     * For the latest info about gl2ps, see http://www.geuz.org/gl2ps/
21   */   */
22    
23  #ifndef __GL2PS_H__  #ifndef __GL2PS_H__
# Line 55  Line 52 
52    
53  /* Version number */  /* Version number */
54    
55  #define GL2PS_MAJOR_VERSION 0  #define GL2PS_MAJOR_VERSION 1
56  #define GL2PS_MINOR_VERSION 9  #define GL2PS_MINOR_VERSION 0
57  #define GL2PS_PATCH_VERSION 2  #define GL2PS_PATCH_VERSION 0
58    
59  #define GL2PS_VERSION (GL2PS_MAJOR_VERSION + \  #define GL2PS_VERSION (GL2PS_MAJOR_VERSION + \
60                         0.01 * GL2PS_MINOR_VERSION + \                         0.01 * GL2PS_MINOR_VERSION + \
# Line 65  Line 62 
62    
63  /* Output file format */  /* Output file format */
64    
65  #define GL2PS_PS  1  #define GL2PS_PS               1
66  #define GL2PS_EPS 2  #define GL2PS_EPS              2
67  #define GL2PS_TEX 3  #define GL2PS_TEX              3
68    #define GL2PS_PDF              4
69    
70  /* Sorting algorithms */  /* Sorting algorithms */
71    
# Line 88  Line 86 
86  #define GL2PS_NO_PS3_SHADING       (1<<7)  #define GL2PS_NO_PS3_SHADING       (1<<7)
87  #define GL2PS_NO_PIXMAP            (1<<8)  #define GL2PS_NO_PIXMAP            (1<<8)
88  #define GL2PS_USE_CURRENT_VIEWPORT (1<<9)  #define GL2PS_USE_CURRENT_VIEWPORT (1<<9)
89    #define GL2PS_DEFLATE              (1<<10)
90    
91  /* Arguments for gl2psEnable/gl2psDisable */  /* Arguments for gl2psEnable/gl2psDisable */
92    
# Line 102  Line 101 
101  #define GL2PS_SIMPLE_OFFSET       0.05  #define GL2PS_SIMPLE_OFFSET       0.05
102  #define GL2PS_SIMPLE_OFFSET_LARGE 1.0  #define GL2PS_SIMPLE_OFFSET_LARGE 1.0
103  #define GL2PS_ZERO(arg)           (fabs(arg)<1.e-20)  #define GL2PS_ZERO(arg)           (fabs(arg)<1.e-20)
104    #define GL2PS_FIXED_XREF_ENTRIES  7
105    
106  /* Message levels and error codes */  /* Message levels and error codes */
107    
# Line 115  Line 115 
115    
116  /* Primitive types */  /* Primitive types */
117    
118    #define GL2PS_NOTYPE     -1
119  #define GL2PS_TEXT       1  #define GL2PS_TEXT       1
120  #define GL2PS_POINT      2  #define GL2PS_POINT      2
121  #define GL2PS_LINE       3  #define GL2PS_LINE       3
# Line 122  Line 123 
123  #define GL2PS_TRIANGLE   5  #define GL2PS_TRIANGLE   5
124  #define GL2PS_PIXMAP     6  #define GL2PS_PIXMAP     6
125    
126    /* Text alignment */
127    
128    #define GL2PS_TEXT_C     1
129    #define GL2PS_TEXT_CL    2
130    #define GL2PS_TEXT_CR    3
131    #define GL2PS_TEXT_B     4
132    #define GL2PS_TEXT_BL    5
133    #define GL2PS_TEXT_BR    6
134    #define GL2PS_TEXT_T     7
135    #define GL2PS_TEXT_TL    8
136    #define GL2PS_TEXT_TR    9
137    
138  /* BSP tree primitive comparison */  /* BSP tree primitive comparison */
139    
140  #define GL2PS_COINCIDENT  1  #define GL2PS_COINCIDENT  1
# Line 175  typedef struct { Line 188  typedef struct {
188    GL2PSrgba rgba;    GL2PSrgba rgba;
189  } GL2PSvertex;  } GL2PSvertex;
190    
191    typedef GL2PSvertex GL2PStriangle[3];
192    
193  typedef struct {  typedef struct {
194    GLshort fontsize;    GLshort fontsize;
195    char *str, *fontname;    char *str, *fontname;
196      GLint alignment;
197  } GL2PSstring;  } GL2PSstring;
198    
199  typedef struct {  typedef struct {
# Line 196  typedef struct { Line 212  typedef struct {
212  } GL2PSprimitive;  } GL2PSprimitive;
213    
214  typedef struct {  typedef struct {
215    GLint format, sort, options, colorsize, colormode, buffersize, maxbestroot;    /* general */
216      GLint format, sort, options, colorsize, colormode, buffersize;
217    const char *title, *producer, *filename;    const char *title, *producer, *filename;
218    GLboolean boundary, zerosurfacearea;    GLboolean boundary;
219    GLfloat *feedback, offset[2];    GLfloat *feedback, offset[2];
220    GLint viewport[4];    GLint viewport[4];
221    GL2PSrgba *colormap, lastrgba, threshold;    GL2PSrgba *colormap, lastrgba, threshold;
222    float lastlinewidth;    float lastlinewidth;
223    GL2PSlist *primitives;    GL2PSlist *primitives;
   GL2PSbsptree2d *imagetree;  
224    FILE *stream;    FILE *stream;
225    
226      /* BSP-specific */
227      GLint maxbestroot;
228    
229      /* occlusion culling-specific */
230      GLboolean zerosurfacearea;
231      GL2PSbsptree2d *imagetree;
232    GL2PSprimitive *primitivetoadd;    GL2PSprimitive *primitivetoadd;
233      
234      /* PDF-specific */
235      int cref[GL2PS_FIXED_XREF_ENTRIES];
236      int streamlength;
237      GL2PSlist *tlist, *tidxlist, *ilist, *slist;
238      int lasttype, consec_cnt, consec_inner_cnt;
239      int line_width_diff, line_rgb_diff, last_line_finished, last_triangle_finished;
240  } GL2PScontext;  } GL2PScontext;
241    
242  /* public functions */  /* public functions */
# Line 233  GL2PSDLL_API GLint gl2psDisable(GLint mo Line 263  GL2PSDLL_API GLint gl2psDisable(GLint mo
263  GL2PSDLL_API GLint gl2psPointSize(GLfloat value);  GL2PSDLL_API GLint gl2psPointSize(GLfloat value);
264  GL2PSDLL_API GLint gl2psLineWidth(GLfloat value);  GL2PSDLL_API GLint gl2psLineWidth(GLfloat value);
265    
266    /* Undocumented */
267    GL2PSDLL_API GLint gl2psTextOpt(const char *str, const char *fontname, GLshort fontsize,
268                                    GLint align, GL2PSrgba color);
269    
270  #ifdef __cplusplus  #ifdef __cplusplus
271  };  };
272  #endif  #endif

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26