ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
gl2ps_def.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file gl2ps_def.h
1 /* Copyright (C) 2010, Guy Barrand. All rights reserved. */
2 /* See the file tools.license for terms. */
3 
4 #ifndef tools_gl2ps_def_h
5 #define tools_gl2ps_def_h
6 
7 typedef int tools_GLint;
8 typedef unsigned int tools_GLuint;
9 typedef float tools_GLfloat;
10 typedef unsigned int tools_GLenum;
11 typedef short tools_GLshort;
12 typedef unsigned short tools_GLushort;
13 typedef int tools_GLsizei;
14 typedef unsigned char tools_GLboolean;
15 
16 /*----------------------------------------------------------*/
17 /*--- from gl2ps.h : --------------------------------------*/
18 /*----------------------------------------------------------*/
19 #define TOOLS_GL2PSDLL_API inline
20 
21 #define TOOLS_GL2PS_MAJOR_VERSION 1
22 #define TOOLS_GL2PS_MINOR_VERSION 4
23 #define TOOLS_GL2PS_PATCH_VERSION 0
24 #define TOOLS_GL2PS_EXTRA_VERSION ""
25 
26 #define TOOLS_GL2PS_VERSION (TOOLS_GL2PS_MAJOR_VERSION + \
27  0.01 * TOOLS_GL2PS_MINOR_VERSION + \
28  0.0001 * TOOLS_GL2PS_PATCH_VERSION)
29 
30 #define TOOLS_GL2PS_COPYRIGHT "(C) 1999-2017 C. Geuzaine"
31 
32 /* Output file formats (the values and the ordering are important!) */
33 
34 #define TOOLS_GL2PS_PS 0
35 #define TOOLS_GL2PS_EPS 1
36 #define TOOLS_GL2PS_TEX 2
37 #define TOOLS_GL2PS_PDF 3
38 #define TOOLS_GL2PS_SVG 4
39 #define TOOLS_GL2PS_PGF 5
40 
41 /* Sorting algorithms */
42 
43 #define TOOLS_GL2PS_NO_SORT 1
44 #define TOOLS_GL2PS_SIMPLE_SORT 2
45 #define TOOLS_GL2PS_BSP_SORT 3
46 
47 /* Message levels and error codes */
48 
49 #define TOOLS_GL2PS_SUCCESS 0
50 #define TOOLS_GL2PS_INFO 1
51 #define TOOLS_GL2PS_WARNING 2
52 #define TOOLS_GL2PS_ERROR 3
53 #define TOOLS_GL2PS_NO_FEEDBACK 4
54 #define TOOLS_GL2PS_OVERFLOW 5
55 #define TOOLS_GL2PS_UNINITIALIZED 6
56 
57 /* Options for tools_gl2psBeginPage */
58 
59 #define TOOLS_GL2PS_NONE 0
60 #define TOOLS_GL2PS_DRAW_BACKGROUND (1<<0)
61 #define TOOLS_GL2PS_SIMPLE_LINE_OFFSET (1<<1)
62 #define TOOLS_GL2PS_SILENT (1<<2)
63 #define TOOLS_GL2PS_BEST_ROOT (1<<3)
64 #define TOOLS_GL2PS_OCCLUSION_CULL (1<<4)
65 #define TOOLS_GL2PS_NO_TEXT (1<<5)
66 #define TOOLS_GL2PS_LANDSCAPE (1<<6)
67 #define TOOLS_GL2PS_NO_PS3_SHADING (1<<7)
68 #define TOOLS_GL2PS_NO_PIXMAP (1<<8)
69 #define TOOLS_GL2PS_USE_CURRENT_VIEWPORT (1<<9)
70 #define TOOLS_GL2PS_COMPRESS (1<<10)
71 #define TOOLS_GL2PS_NO_BLENDING (1<<11)
72 #define TOOLS_GL2PS_TIGHT_BOUNDING_BOX (1<<12)
73 #define TOOLS_GL2PS_NO_OPENGL_CONTEXT (1<<13)
74 
75 /* Arguments for tools_gl2psEnable/tools_gl2psDisable */
76 
77 #define TOOLS_GL2PS_POLYGON_OFFSET_FILL 1
78 #define TOOLS_GL2PS_POLYGON_BOUNDARY 2
79 #define TOOLS_GL2PS_LINE_STIPPLE 3
80 #define TOOLS_GL2PS_BLEND 4
81 
82 
83 /* Arguments for tools_gl2psLineCap/Join */
84 
85 #define TOOLS_GL2PS_LINE_CAP_BUTT 0
86 #define TOOLS_GL2PS_LINE_CAP_ROUND 1
87 #define TOOLS_GL2PS_LINE_CAP_SQUARE 2
88 
89 #define TOOLS_GL2PS_LINE_JOIN_MITER 0
90 #define TOOLS_GL2PS_LINE_JOIN_ROUND 1
91 #define TOOLS_GL2PS_LINE_JOIN_BEVEL 2
92 
93 /* Text alignment (o=raster position; default mode is BL):
94  +---+ +---+ +---+ +---+ +---+ +---+ +-o-+ o---+ +---o
95  | o | o | | o | | | | | | | | | | | |
96  +---+ +---+ +---+ +-o-+ o---+ +---o +---+ +---+ +---+
97  C CL CR B BL BR T TL TR */
98 
99 #define TOOLS_GL2PS_TEXT_C 1
100 #define TOOLS_GL2PS_TEXT_CL 2
101 #define TOOLS_GL2PS_TEXT_CR 3
102 #define TOOLS_GL2PS_TEXT_B 4
103 #define TOOLS_GL2PS_TEXT_BL 5
104 #define TOOLS_GL2PS_TEXT_BR 6
105 #define TOOLS_GL2PS_TEXT_T 7
106 #define TOOLS_GL2PS_TEXT_TL 8
107 #define TOOLS_GL2PS_TEXT_TR 9
108 
111 
112 typedef struct {
116 
117 /* Primitive types */
118 #define TOOLS_GL2PS_NO_TYPE -1
119 #define TOOLS_GL2PS_TEXT 1
120 #define TOOLS_GL2PS_POINT 2
121 #define TOOLS_GL2PS_LINE 3
122 #define TOOLS_GL2PS_QUADRANGLE 4
123 #define TOOLS_GL2PS_TRIANGLE 5
124 #define TOOLS_GL2PS_PIXMAP 6
125 #define TOOLS_GL2PS_IMAGEMAP 7
126 #define TOOLS_GL2PS_IMAGEMAP_WRITTEN 8
127 #define TOOLS_GL2PS_IMAGEMAP_VISIBLE 9
128 #define TOOLS_GL2PS_SPECIAL 10
129 
130 /*----------------------------------------------------------*/
131 /*--- from OpenGL : ----------------------------------------*/
132 /*----------------------------------------------------------*/
133 #define TOOLS_GL_TRUE 1
134 #define TOOLS_GL_FALSE 0
135 
136 #define TOOLS_GL_FLOAT 0x1406
137 #define TOOLS_GL_BLEND 0x0BE2
138 
139 #define TOOLS_GL_SRC_ALPHA 0x0302
140 #define TOOLS_GL_ONE_MINUS_SRC_ALPHA 0x0303
141 
142 #define TOOLS_GL_RGB 0x1907
143 #define TOOLS_GL_RGBA 0x1908
144 
145 #define TOOLS_GL_POINTS 0x0000
146 
147 #define TOOLS_GL_CURRENT_RASTER_POSITION_VALID 0x0B08
148 #define TOOLS_GL_CURRENT_RASTER_POSITION 0x0B07
149 #define TOOLS_GL_CURRENT_RASTER_COLOR 0x0B04
150 #define TOOLS_GL_ZERO 0
151 #define TOOLS_GL_ONE 1
152 #define TOOLS_GL_COLOR_INDEX 0x1900
153 
154 #define TOOLS_GL_POINT_TOKEN 0x0701
155 #define TOOLS_GL_LINE_TOKEN 0x0702
156 #define TOOLS_GL_LINE_RESET_TOKEN 0x0707
157 #define TOOLS_GL_POLYGON_TOKEN 0x0703
158 #define TOOLS_GL_BITMAP_TOKEN 0x0704
159 #define TOOLS_GL_DRAW_PIXEL_TOKEN 0x0705
160 
161 #define TOOLS_GL_COPY_PIXEL_TOKEN 0x0706
162 #define TOOLS_GL_PASS_THROUGH_TOKEN 0x0700
163 
164 #define TOOLS_GL_FEEDBACK 0x1C01
165 #define TOOLS_GL_COLOR_CLEAR_VALUE 0x0C22
166 #define TOOLS_GL_INDEX_CLEAR_VALUE 0x0C20
167 #define TOOLS_GL_RENDER 0x1C00
168 #define TOOLS_GL_VIEWPORT 0x0BA2
169 #define TOOLS_GL_BLEND_SRC 0x0BE1
170 #define TOOLS_GL_BLEND_DST 0x0BE0
171 #define TOOLS_GL_3D_COLOR 0x0602
172 
173 #define TOOLS_GL_POLYGON_OFFSET_FACTOR 0x8038
174 #define TOOLS_GL_POLYGON_OFFSET_UNITS 0x2A00
175 #define TOOLS_GL_LINE_STIPPLE_PATTERN 0x0B25
176 #define TOOLS_GL_LINE_STIPPLE_REPEAT 0x0B26
177 
178 #define TOOLS_GL_ZOOM_X 0x0D16
179 #define TOOLS_GL_ZOOM_Y 0x0D17
180 
181 /*----------------------------------------------------------*/
182 /*----------------------------------------------------------*/
183 /*----------------------------------------------------------*/
184 typedef struct {
185  tools_GLboolean (*m_glIsEnabled) (tools_GLenum);
186  void (*m_glBegin) (tools_GLenum);
187  void (*m_glEnd) ();
188  void (*m_glGetFloatv) (tools_GLenum,tools_GLfloat*);
190  void (*m_glGetBooleanv) (tools_GLenum,tools_GLboolean*);
191  void (*m_glGetIntegerv) (tools_GLenum,tools_GLint*);
192  tools_GLint (*m_glRenderMode) (tools_GLenum);
193  void (*m_glFeedbackBuffer) (tools_GLsizei,tools_GLenum,tools_GLfloat*);
194  void (*m_glPassThrough) (tools_GLfloat);
196 
197 #endif