00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035 #ifndef __GL2PS_H__
00036 #define __GL2PS_H__
00037
00038 #include <stdio.h>
00039 #include <stdlib.h>
00040
00041 #include <TGLIncludes.h>
00042
00043 #define GL2PSDLL_API
00044
00045
00046
00047
00048 #if defined(HAVE_ZLIB) || defined(HAVE_LIBZ)
00049 # define GL2PS_HAVE_ZLIB
00050 # if defined(HAVE_LIBPNG) || defined(HAVE_PNG)
00051 # define GL2PS_HAVE_LIBPNG
00052 # endif
00053 #endif
00054
00055
00056
00057 #define GL2PS_MAJOR_VERSION 1
00058 #define GL2PS_MINOR_VERSION 3
00059 #define GL2PS_PATCH_VERSION 3
00060 #define GL2PS_EXTRA_VERSION ""
00061
00062 #define GL2PS_VERSION (GL2PS_MAJOR_VERSION + \
00063 0.01 * GL2PS_MINOR_VERSION + \
00064 0.0001 * GL2PS_PATCH_VERSION)
00065
00066 #define GL2PS_COPYRIGHT "(C) 1999-2009 C. Geuzaine"
00067
00068
00069
00070 #define GL2PS_PS 0
00071 #define GL2PS_EPS 1
00072 #define GL2PS_TEX 2
00073 #define GL2PS_PDF 3
00074 #define GL2PS_SVG 4
00075 #define GL2PS_PGF 5
00076
00077
00078
00079 #define GL2PS_NO_SORT 1
00080 #define GL2PS_SIMPLE_SORT 2
00081 #define GL2PS_BSP_SORT 3
00082
00083
00084
00085 #define GL2PS_SUCCESS 0
00086 #define GL2PS_INFO 1
00087 #define GL2PS_WARNING 2
00088 #define GL2PS_ERROR 3
00089 #define GL2PS_NO_FEEDBACK 4
00090 #define GL2PS_OVERFLOW 5
00091 #define GL2PS_UNINITIALIZED 6
00092
00093
00094
00095 #define GL2PS_NONE 0
00096 #define GL2PS_DRAW_BACKGROUND (1<<0)
00097 #define GL2PS_SIMPLE_LINE_OFFSET (1<<1)
00098 #define GL2PS_SILENT (1<<2)
00099 #define GL2PS_BEST_ROOT (1<<3)
00100 #define GL2PS_OCCLUSION_CULL (1<<4)
00101 #define GL2PS_NO_TEXT (1<<5)
00102 #define GL2PS_LANDSCAPE (1<<6)
00103 #define GL2PS_NO_PS3_SHADING (1<<7)
00104 #define GL2PS_NO_PIXMAP (1<<8)
00105 #define GL2PS_USE_CURRENT_VIEWPORT (1<<9)
00106 #define GL2PS_COMPRESS (1<<10)
00107 #define GL2PS_NO_BLENDING (1<<11)
00108 #define GL2PS_TIGHT_BOUNDING_BOX (1<<12)
00109
00110
00111
00112 #define GL2PS_POLYGON_OFFSET_FILL 1
00113 #define GL2PS_POLYGON_BOUNDARY 2
00114 #define GL2PS_LINE_STIPPLE 3
00115 #define GL2PS_BLEND 4
00116
00117
00118
00119
00120
00121
00122
00123 #define GL2PS_TEXT_C 1
00124 #define GL2PS_TEXT_CL 2
00125 #define GL2PS_TEXT_CR 3
00126 #define GL2PS_TEXT_B 4
00127 #define GL2PS_TEXT_BL 5
00128 #define GL2PS_TEXT_BR 6
00129 #define GL2PS_TEXT_T 7
00130 #define GL2PS_TEXT_TL 8
00131 #define GL2PS_TEXT_TR 9
00132
00133 typedef GLfloat GL2PSrgba[4];
00134
00135 #if defined(__cplusplus)
00136 extern "C" {
00137 #endif
00138
00139 GL2PSDLL_API GLint gl2psBeginPage(const char *title, const char *producer,
00140 GLint viewport[4], GLint format, GLint sort,
00141 GLint options, GLint colormode,
00142 GLint colorsize, GL2PSrgba *colormap,
00143 GLint nr, GLint ng, GLint nb, GLint buffersize,
00144 FILE *stream, const char *filename);
00145 GL2PSDLL_API GLint gl2psEndPage(void);
00146 GL2PSDLL_API GLint gl2psSetOptions(GLint options);
00147 GL2PSDLL_API GLint gl2psGetOptions(GLint *options);
00148 GL2PSDLL_API GLint gl2psBeginViewport(GLint viewport[4]);
00149 GL2PSDLL_API GLint gl2psEndViewport(void);
00150 GL2PSDLL_API GLint gl2psText(const char *str, const char *fontname,
00151 GLshort fontsize);
00152 GL2PSDLL_API GLint gl2psTextOpt(const char *str, const char *fontname,
00153 GLshort fontsize, GLint align, GLfloat angle);
00154 GL2PSDLL_API GLint gl2psSpecial(GLint format, const char *str);
00155 GL2PSDLL_API GLint gl2psDrawPixels(GLsizei width, GLsizei height,
00156 GLint xorig, GLint yorig,
00157 GLenum format, GLenum type, const void *pixels);
00158 GL2PSDLL_API GLint gl2psEnable(GLint mode);
00159 GL2PSDLL_API GLint gl2psDisable(GLint mode);
00160 GL2PSDLL_API GLint gl2psPointSize(GLfloat value);
00161 GL2PSDLL_API GLint gl2psLineWidth(GLfloat value);
00162 GL2PSDLL_API GLint gl2psBlendFunc(GLenum sfactor, GLenum dfactor);
00163
00164
00165 GL2PSDLL_API GLint gl2psDrawImageMap(GLsizei width, GLsizei height,
00166 const GLfloat position[3],
00167 const unsigned char *imagemap);
00168 GL2PSDLL_API const char *gl2psGetFileExtension(GLint format);
00169 GL2PSDLL_API const char *gl2psGetFormatDescription(GLint format);
00170
00171 #if defined(__cplusplus)
00172 }
00173 #endif
00174
00175 #endif