Changeset 937 for trunk/source/visualization/externals/gl2ps/include
- Timestamp:
- Mar 4, 2009, 3:13:51 PM (17 years ago)
- Location:
- trunk/source/visualization/externals/gl2ps/include
- Files:
-
- 2 edited
-
Geant4_gl2ps.h (modified) (9 diffs)
-
gl2ps.h (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/visualization/externals/gl2ps/include/Geant4_gl2ps.h
r919 r937 27 27 #define Geant4_gl2ps_h 28 28 29 // gl2ps- 0.73.29 // gl2ps-1.3.3 30 30 // The gl2ps code is prefixed by Geant4_ in order 31 31 // to avoid clashes with other gl2ps code that may come at link … … 39 39 #define gl2psPointSize Geant4_gl2psPointSize 40 40 #define gl2psLineWidth Geant4_gl2psLineWidth 41 #define gl2psNumShadeColors Geant4_gl2psNumShadeColors42 41 #define gl2psDrawPixels Geant4_gl2psDrawPixels 43 42 #define gl2psBeginViewport Geant4_gl2psBeginViewport 44 43 #define gl2psEndViewport Geant4_gl2psEndViewport 44 #define gl2psTextOpt Geant4_gl2psTextOpt 45 #define gl2psSetOptions Geant4_gl2psSetOptions 46 #define gl2psGetOptions Geant4_gl2psGetOptions 47 #define gl2psSpecial Geant4_gl2psSpecial 48 #define gl2psBlendFunc Geant4_gl2psBlendFunc 49 #define gl2psDrawImageMap Geant4_gl2psDrawImageMap 50 #define gl2psGetFileExtension Geant4_gl2psGetFileExtension 51 #define gl2psGetFormatDescription Geant4_gl2psGetFormatDescription 45 52 46 53 #define gl2psMsg Geant4_gl2psMsg … … 48 55 #define gl2psRealloc Geant4_gl2psRealloc 49 56 #define gl2psFree Geant4_gl2psFree 57 #define gl2psWriteBigEndian Geant4_gl2psWriteBigEndian 58 #define gl2psSetupCompress Geant4_gl2psSetupCompress 59 #define gl2psFreeCompress Geant4_gl2psFreeCompress 60 #define gl2psAllocCompress Geant4_gl2psAllocCompress 61 #define gl2psReallocCompress Geant4_gl2psReallocCompress 62 #define gl2psWriteBigEndianCompress Geant4_gl2psWriteBigEndianCompress 63 #define gl2psDeflate Geant4_gl2psDeflate 64 #define gl2psPrintf Geant4_gl2psPrintf 65 #define gl2psPrintGzipHeader Geant4_gl2psPrintGzipHeader 66 #define gl2psPrintGzipFooter Geant4_gl2psPrintGzipFooter 67 #define gl2psListReset Geant4_gl2psListReset 50 68 #define gl2psListRealloc Geant4_gl2psListRealloc 51 69 #define gl2psListCreate Geant4_gl2psListCreate … … 57 75 #define gl2psListAction Geant4_gl2psListAction 58 76 #define gl2psListActionInverse Geant4_gl2psListActionInverse 77 #define gl2psListRead Geant4_gl2psListRead 78 #define gl2psEncodeBase64Block Geant4_gl2psEncodeBase64Block 79 #define gl2psListEncodeBase64 Geant4_gl2psListEncodeBase64 80 #define gl2psSameColor Geant4_gl2psSameColor 81 #define gl2psVertsSameColor Geant4_gl2psVertsSameColor 82 #define gl2psSameColorThreshold Geant4_gl2psSameColorThreshold 83 #define gl2psSetLastColor Geant4_gl2psSetLastColor 84 #define gl2psGetRGB Geant4_gl2psGetRGB 85 #define gl2psCopyPixmap Geant4_gl2psCopyPixmap 86 #define gl2psFreePixmap Geant4_gl2psFreePixmap 87 #define gl2psUserWritePNG Geant4_gl2psUserWritePNG 88 #define gl2psUserFlushPNG Geant4_gl2psUserFlushPNG 89 #define gl2psConvertPixmapToPNG Geant4_gl2psConvertPixmapToPNG 90 #define gl2psAddText Geant4_gl2psAddText 91 #define gl2psCopyText Geant4_gl2psCopyText 92 #define gl2psFreeText Geant4_gl2psFreeText 93 #define gl2psSupportedBlendMode Geant4_gl2psSupportedBlendMode 94 #define gl2psAdaptVertexForBlending Geant4_gl2psAdaptVertexForBlending 95 #define gl2psAssignTriangleProperties Geant4_gl2psAssignTriangleProperties 96 #define gl2psFillTriangleFromPrimitive Geant4_gl2psFillTriangleFromPrimitive 97 #define gl2psInitTriangle Geant4_gl2psInitTriangle 98 #define gl2psCopyPrimitive Geant4_gl2psCopyPrimitive 99 #define gl2psSamePosition Geant4_gl2psSamePosition 59 100 #define gl2psComparePointPlane Geant4_gl2psComparePointPlane 60 101 #define gl2psPsca Geant4_gl2psPsca … … 73 114 #define gl2psTrianglesFirst Geant4_gl2psTrianglesFirst 74 115 #define gl2psFindRoot Geant4_gl2psFindRoot 116 #define gl2psFreeImagemap Geant4_gl2psFreeImagemap 75 117 #define gl2psFreePrimitive Geant4_gl2psFreePrimitive 76 118 #define gl2psAddPrimitiveInList Geant4_gl2psAddPrimitiveInList … … 80 122 #define gl2psBuildBspTree Geant4_gl2psBuildBspTree 81 123 #define gl2psTraverseBspTree Geant4_gl2psTraverseBspTree 124 #define gl2psRescaleAndOffset Geant4_gl2psRescaleAndOffset 82 125 #define gl2psGetPlaneFromPoints Geant4_gl2psGetPlaneFromPoints 83 126 #define gl2psFreeBspImageTree Geant4_gl2psFreeBspImageTree … … 88 131 #define gl2psSplitPrimitive2D Geant4_gl2psSplitPrimitive2D 89 132 #define gl2psAddInImageTree Geant4_gl2psAddInImageTree 90 #define gl2psAddIn Image Geant4_gl2psAddInImage133 #define gl2psAddInBspImageTree Geant4_gl2psAddInBspImageTree 91 134 #define gl2psAddBoundaryInList Geant4_gl2psAddBoundaryInList 92 135 #define gl2psBuildPolygonBoundary Geant4_gl2psBuildPolygonBoundary … … 94 137 #define gl2psGetVertex Geant4_gl2psGetVertex 95 138 #define gl2psParseFeedbackBuffer Geant4_gl2psParseFeedbackBuffer 96 #define gl2psSameColor Geant4_gl2psSameColor 97 #define gl2psVertsSameColor Geant4_gl2psVertsSameColor 139 #define gl2psWriteByte Geant4_gl2psWriteByte 140 #define gl2psPrintPostScriptPixmap Geant4_gl2psPrintPostScriptPixmap 141 #define gl2psPrintPostScriptImagemap Geant4_gl2psPrintPostScriptImagemap 98 142 #define gl2psPrintPostScriptHeader Geant4_gl2psPrintPostScriptHeader 99 143 #define gl2psPrintPostScriptColor Geant4_gl2psPrintPostScriptColor 100 144 #define gl2psResetPostScriptColor Geant4_gl2psResetPostScriptColor 145 #define gl2psEndPostScriptLine Geant4_gl2psEndPostScriptLine 146 #define gl2psParseStipplePattern Geant4_gl2psParseStipplePattern 147 #define gl2psPrintPostScriptDash Geant4_gl2psPrintPostScriptDash 101 148 #define gl2psPrintPostScriptPrimitive Geant4_gl2psPrintPostScriptPrimitive 102 149 #define gl2psPrintPostScriptFooter Geant4_gl2psPrintPostScriptFooter … … 108 155 #define gl2psPrintPostScriptEndViewport Geant4_gl2psPrintPostScriptEndViewport 109 156 110 #define gl2psWriteByte Geant4_gl2psWriteByte 111 #define gl2psGetRGB Geant4_gl2psGetRGB 112 #define gl2psPrintPostScriptPixmap Geant4_gl2psPrintPostScriptPixmap 113 #define gl2psListReset Geant4_gl2psListReset 114 #define gl2psAddInBspImageTree Geant4_gl2psAddInBspImageTree 157 #define gl2psPrintPostScriptFinalPrimitive Geant4_gl2psPrintPostScriptFinalPrimitive 115 158 #define gl2psPrintPrimitives Geant4_gl2psPrintPrimitives 116 159 #define gl2psPrintTeXBeginViewport Geant4_gl2psPrintTeXBeginViewport 117 160 #define gl2psPrintTeXEndViewport Geant4_gl2psPrintTeXEndViewport 161 #define gl2psPrintTeXFinalPrimitive Geant4_gl2psPrintTeXFinalPrimitive 162 #define gl2psPrintPDFCompressorType Geant4_gl2psPrintPDFCompressorType 163 #define gl2psPrintPDFStrokeColor Geant4_gl2psPrintPDFStrokeColor 164 #define gl2psPrintPDFFillColor Geant4_gl2psPrintPDFFillColor 165 #define gl2psPrintPDFLineWidth Geant4_gl2psPrintPDFLineWidth 166 #define gl2psPutPDFText Geant4_gl2psPutPDFText 167 #define gl2psPutPDFImage Geant4_gl2psPutPDFImage 168 #define gl2psPDFstacksInit Geant4_gl2psPDFstacksInit 169 #define gl2psPDFgroupObjectInit Geant4_gl2psPDFgroupObjectInit 170 #define gl2psPDFgroupListInit Geant4_gl2psPDFgroupListInit 171 #define gl2psSortOutTrianglePDFgroup Geant4_gl2psSortOutTrianglePDFgroup 172 #define gl2psPDFgroupListWriteMainStream Geant4_gl2psPDFgroupListWriteMainStream 173 #define gl2psPDFgroupListWriteGStateResources Geant4_gl2psPDFgroupListWriteGStateResources 174 #define gl2psPDFgroupListWriteShaderResources Geant4_gl2psPDFgroupListWriteShaderResources 175 #define gl2psPDFgroupListWriteXObjectResources Geant4_gl2psPDFgroupListWriteXObjectResources 176 #define gl2psPDFgroupListWriteFontResources Geant4_gl2psPDFgroupListWriteFontResources 177 #define gl2psPDFgroupListDelete Geant4_gl2psPDFgroupListDelete 178 #define gl2psPrintPDFInfo Geant4_gl2psPrintPDFInfo 179 #define gl2psPrintPDFCatalog Geant4_gl2psPrintPDFCatalog 180 #define gl2psPrintPDFPages Geant4_gl2psPrintPDFPages 181 #define gl2psOpenPDFDataStream Geant4_gl2psOpenPDFDataStream 182 #define gl2psOpenPDFDataStreamWritePreface Geant4_gl2psOpenPDFDataStreamWritePreface 183 #define gl2psPrintPDFHeader Geant4_gl2psPrintPDFHeader 184 #define gl2psPrintPDFPrimitive Geant4_gl2psPrintPDFPrimitive 185 #define gl2psClosePDFDataStream Geant4_gl2psClosePDFDataStream 186 #define gl2psPrintPDFDataStreamLength Geant4_gl2psPrintPDFDataStreamLength 187 #define gl2psPrintPDFOpenPage Geant4_gl2psPrintPDFOpenPage 188 #define gl2psPDFgroupListWriteVariableResources Geant4_gl2psPDFgroupListWriteVariableResources 189 #define gl2psPrintPDFGSObject Geant4_gl2psPrintPDFGSObject 190 #define gl2psPrintPDFShaderStreamDataCoord Geant4_gl2psPrintPDFShaderStreamDataCoord 191 #define gl2psPrintPDFShaderStreamDataRGB Geant4_gl2psPrintPDFShaderStreamDataRGB 192 #define gl2psPrintPDFShaderStreamDataAlpha Geant4_gl2psPrintPDFShaderStreamDataAlpha 193 #define gl2psPrintPDFShaderStreamData Geant4_gl2psPrintPDFShaderStreamData 194 #define gl2psPDFRectHull Geant4_gl2psPDFRectHull 195 #define gl2psPrintPDFShader Geant4_gl2psPrintPDFShader 196 #define gl2psPrintPDFShaderMask Geant4_gl2psPrintPDFShaderMask 197 #define gl2psPrintPDFShaderExtGS Geant4_gl2psPrintPDFShaderExtGS 198 #define gl2psPrintPDFShaderSimpleExtGS Geant4_gl2psPrintPDFShaderSimpleExtGS 199 #define gl2psPrintPDFPixmapStreamData Geant4_gl2psPrintPDFPixmapStreamData 200 #define gl2psPrintPDFPixmap Geant4_gl2psPrintPDFPixmap 201 #define gl2psPrintPDFText Geant4_gl2psPrintPDFText 202 #define gl2psPDFgroupListWriteObjects Geant4_gl2psPDFgroupListWriteObjects 203 #define gl2psPrintPDFFooter Geant4_gl2psPrintPDFFooter 204 #define gl2psPrintPDFBeginViewport Geant4_gl2psPrintPDFBeginViewport 205 #define gl2psPrintPDFEndViewport Geant4_gl2psPrintPDFEndViewport 206 #define gl2psPrintPDFFinalPrimitive Geant4_gl2psPrintPDFFinalPrimitive 207 #define gl2psSVGGetCoordsAndColors Geant4_gl2psSVGGetCoordsAndColors 208 #define gl2psSVGGetColorString Geant4_gl2psSVGGetColorString 209 #define gl2psPrintSVGHeader Geant4_gl2psPrintSVGHeader 210 #define gl2psPrintSVGSmoothTriangle Geant4_gl2psPrintSVGSmoothTriangle 211 #define gl2psPrintSVGDash Geant4_gl2psPrintSVGDash 212 #define gl2psEndSVGLine Geant4_gl2psEndSVGLine 213 #define gl2psPrintSVGPixmap Geant4_gl2psPrintSVGPixmap 214 #define gl2psPrintSVGPrimitive Geant4_gl2psPrintSVGPrimitive 215 #define gl2psPrintSVGFooter Geant4_gl2psPrintSVGFooter 216 #define gl2psPrintSVGBeginViewport Geant4_gl2psPrintSVGBeginViewport 217 #define gl2psPrintSVGEndViewport Geant4_gl2psPrintSVGEndViewport 218 #define gl2psPrintSVGFinalPrimitive Geant4_gl2psPrintSVGFinalPrimitive 219 #define gl2psPrintPGFColor Geant4_gl2psPrintPGFColor 220 #define gl2psPrintPGFHeader Geant4_gl2psPrintPGFHeader 221 #define gl2psPrintPGFDash Geant4_gl2psPrintPGFDash 222 #define gl2psPGFTextAlignment Geant4_gl2psPGFTextAlignment 223 #define gl2psPrintPGFPrimitive Geant4_gl2psPrintPGFPrimitive 224 #define gl2psPrintPGFFooter Geant4_gl2psPrintPGFFooter 225 #define gl2psPrintPGFBeginViewport Geant4_gl2psPrintPGFBeginViewport 226 #define gl2psPrintPGFEndViewport Geant4_gl2psPrintPGFEndViewport 227 #define gl2psPrintPGFFinalPrimitive Geant4_gl2psPrintPGFFinalPrimitive 228 #define gl2psComputeTightBoundingBox Geant4_gl2psComputeTightBoundingBox 118 229 119 230 #define gl2ps Geant4_gl2ps -
trunk/source/visualization/externals/gl2ps/include/gl2ps.h
r930 r937 26 26 /* 27 27 * GL2PS, an OpenGL to PostScript Printing Library 28 * Copyright (C) 1999-200 3 ChristopheGeuzaine29 * 30 * $Id: gl2ps.h,v 1.1 2009/02/18 09:54:12 lgarnier Exp $31 * 32 * E-mail: geuz@geuz.org33 * URL: http://www.geuz.org/gl2ps/34 * 35 * This library is free software; you can redistribute it and/or36 * modify it under the terms of the GNU Library General Public37 * License as published by the Free Software Foundation;either28 * Copyright (C) 1999-2009 C. Geuzaine 29 * 30 * This program is free software; you can redistribute it and/or 31 * modify it under the terms of either: 32 * 33 * a) the GNU Library General Public License as published by the Free 34 * Software Foundation, either version 2 of the License, or (at your 35 * option) any later version; or 36 * 37 * b) the GL2PS License as published by Christophe Geuzaine, either 38 38 * version 2 of the License, or (at your option) any later version. 39 39 * 40 * This library is distributed in the hope that it will be useful, 41 * but WITHOUT ANY WARRANTY; without even the implied warranty of 42 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 43 * Library General Public License for more details. 40 * This program is distributed in the hope that it will be useful, but 41 * WITHOUT ANY WARRANTY; without even the implied warranty of 42 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either 43 * the GNU Library General Public License or the GL2PS License for 44 * more details. 44 45 * 45 46 * You should have received a copy of the GNU Library General Public 46 * License along with this library; if not, write to the Free 47 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 48 * 47 * License along with this library in the file named "COPYING.LGPL"; 48 * if not, write to the Free Software Foundation, Inc., 675 Mass Ave, 49 * Cambridge, MA 02139, USA. 50 * 51 * You should have received a copy of the GL2PS License with this 52 * library in the file named "COPYING.GL2PS"; if not, I will be glad 53 * to provide one. 54 * 55 * For the latest info about gl2ps, see http://www.geuz.org/gl2ps/. 56 * Please report all bugs and problems to <gl2ps@geuz.org>. 49 57 */ 50 58 … … 54 62 #include <stdio.h> 55 63 #include <stdlib.h> 56 #include <cmath> 57 58 /* To generate a Windows dll, you have to define GL2PSDLL at compile 59 time */ 60 61 #ifdef WIN32 64 65 /* Define GL2PSDLL at compile time to build a Windows DLL */ 66 67 #if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__) 68 # if defined(_MSC_VER) 69 # pragma warning(disable:4115) 70 # endif 62 71 # include <windows.h> 63 # if def GL2PSDLL64 # if def GL2PSDLL_EXPORTS72 # if defined(GL2PSDLL) 73 # if defined(GL2PSDLL_EXPORTS) 65 74 # define GL2PSDLL_API __declspec(dllexport) 66 75 # else … … 74 83 #endif 75 84 76 #if def __APPLE__85 #if defined(__APPLE__) || defined(HAVE_OPENGL_GL_H) 77 86 # include <OpenGL/gl.h> 78 87 #else … … 80 89 #endif 81 90 82 83 #define GL2PS_VERSION 0.8 84 #define GL2PS_NONE 0 85 86 /* Output file format */ 87 88 #define GL2PS_PS 1 89 #define GL2PS_EPS 2 90 #define GL2PS_TEX 3 91 /* Support for compressed PostScript/PDF/SVG and for embedded PNG 92 images in SVG */ 93 94 #if defined(HAVE_ZLIB) || defined(HAVE_LIBZ) 95 # define GL2PS_HAVE_ZLIB 96 # if defined(HAVE_LIBPNG) || defined(HAVE_PNG) 97 # define GL2PS_HAVE_LIBPNG 98 # endif 99 #endif 100 101 /* Version number */ 102 103 #define GL2PS_MAJOR_VERSION 1 104 #define GL2PS_MINOR_VERSION 3 105 #define GL2PS_PATCH_VERSION 3 106 #define GL2PS_EXTRA_VERSION "" 107 108 #define GL2PS_VERSION (GL2PS_MAJOR_VERSION + \ 109 0.01 * GL2PS_MINOR_VERSION + \ 110 0.0001 * GL2PS_PATCH_VERSION) 111 112 #define GL2PS_COPYRIGHT "(C) 1999-2009 C. Geuzaine" 113 114 /* Output file formats (the values and the ordering are important!) */ 115 116 #define GL2PS_PS 0 117 #define GL2PS_EPS 1 118 #define GL2PS_TEX 2 119 #define GL2PS_PDF 3 120 #define GL2PS_SVG 4 121 #define GL2PS_PGF 5 91 122 92 123 /* Sorting algorithms */ 93 124 94 #define GL2PS_NO_SORT 1 95 #define GL2PS_SIMPLE_SORT 2 96 #define GL2PS_BSP_SORT 3 125 #define GL2PS_NO_SORT 1 126 #define GL2PS_SIMPLE_SORT 2 127 #define GL2PS_BSP_SORT 3 128 129 /* Message levels and error codes */ 130 131 #define GL2PS_SUCCESS 0 132 #define GL2PS_INFO 1 133 #define GL2PS_WARNING 2 134 #define GL2PS_ERROR 3 135 #define GL2PS_NO_FEEDBACK 4 136 #define GL2PS_OVERFLOW 5 137 #define GL2PS_UNINITIALIZED 6 97 138 98 139 /* Options for gl2psBeginPage */ 99 140 100 #define GL2PS_DRAW_BACKGROUND (1<<0) 101 #define GL2PS_SIMPLE_LINE_OFFSET (1<<1) 102 #define GL2PS_SILENT (1<<2) 103 #define GL2PS_BEST_ROOT (1<<3) 104 #define GL2PS_OCCLUSION_CULL (1<<4) 105 #define GL2PS_NO_TEXT (1<<5) 106 #define GL2PS_LANDSCAPE (1<<6) 107 #define GL2PS_NO_PS3_SHADING (1<<7) 108 #define GL2PS_NO_PIXMAP (1<<8) 141 #define GL2PS_NONE 0 142 #define GL2PS_DRAW_BACKGROUND (1<<0) 143 #define GL2PS_SIMPLE_LINE_OFFSET (1<<1) 144 #define GL2PS_SILENT (1<<2) 145 #define GL2PS_BEST_ROOT (1<<3) 146 #define GL2PS_OCCLUSION_CULL (1<<4) 147 #define GL2PS_NO_TEXT (1<<5) 148 #define GL2PS_LANDSCAPE (1<<6) 149 #define GL2PS_NO_PS3_SHADING (1<<7) 150 #define GL2PS_NO_PIXMAP (1<<8) 151 #define GL2PS_USE_CURRENT_VIEWPORT (1<<9) 152 #define GL2PS_COMPRESS (1<<10) 153 #define GL2PS_NO_BLENDING (1<<11) 154 #define GL2PS_TIGHT_BOUNDING_BOX (1<<12) 109 155 110 156 /* Arguments for gl2psEnable/gl2psDisable */ 111 157 112 #define GL2PS_POLYGON_OFFSET_FILL 1 113 #define GL2PS_POLYGON_BOUNDARY 2 114 #define GL2PS_LINE_STIPPLE 3 115 116 /* Magic numbers */ 117 118 #define GL2PS_EPSILON 5.e-3 119 #define GL2PS_DEPTH_FACT 1000.0 120 #define GL2PS_SIMPLE_OFFSET 0.05 121 #define GL2PS_SIMPLE_OFFSET_LARGE 1.0 122 #define GL2PS_ZERO(arg) (std::fabs(arg)<1.e-20) 123 /*#define GL2PS_ZERO(arg) ((arg)==0.0)*/ 124 125 /* Message levels and error codes */ 126 127 #define GL2PS_SUCCESS 0 128 #define GL2PS_INFO 1 129 #define GL2PS_WARNING 2 130 #define GL2PS_ERROR 3 131 #define GL2PS_NO_FEEDBACK 4 132 #define GL2PS_OVERFLOW 5 133 #define GL2PS_UNINITIALIZED 6 134 135 /* Primitive types */ 136 137 #define GL2PS_TEXT 1 138 #define GL2PS_POINT 2 139 #define GL2PS_LINE 3 140 #define GL2PS_QUADRANGLE 4 141 #define GL2PS_TRIANGLE 5 142 #define GL2PS_PIXMAP 6 143 144 /* BSP tree primitive comparison */ 145 146 #define GL2PS_COINCIDENT 1 147 #define GL2PS_IN_FRONT_OF 2 148 #define GL2PS_IN_BACK_OF 3 149 #define GL2PS_SPANNING 4 150 151 /* 2D BSP tree primitive comparison */ 152 153 #define GL2PS_POINT_COINCIDENT 0 154 #define GL2PS_POINT_INFRONT 1 155 #define GL2PS_POINT_BACK 2 156 157 /* Pass through options */ 158 159 #define GL2PS_BEGIN_POLYGON_OFFSET_FILL 1 160 #define GL2PS_END_POLYGON_OFFSET_FILL 2 161 #define GL2PS_BEGIN_POLYGON_BOUNDARY 3 162 #define GL2PS_END_POLYGON_BOUNDARY 4 163 #define GL2PS_BEGIN_LINE_STIPPLE 5 164 #define GL2PS_END_LINE_STIPPLE 6 165 #define GL2PS_SET_POINT_SIZE 7 166 #define GL2PS_SET_LINE_WIDTH 8 158 #define GL2PS_POLYGON_OFFSET_FILL 1 159 #define GL2PS_POLYGON_BOUNDARY 2 160 #define GL2PS_LINE_STIPPLE 3 161 #define GL2PS_BLEND 4 162 163 /* Text alignment (o=raster position; default mode is BL): 164 +---+ +---+ +---+ +---+ +---+ +---+ +-o-+ o---+ +---o 165 | o | o | | o | | | | | | | | | | | | 166 +---+ +---+ +---+ +-o-+ o---+ +---o +---+ +---+ +---+ 167 C CL CR B BL BR T TL TR */ 168 169 #define GL2PS_TEXT_C 1 170 #define GL2PS_TEXT_CL 2 171 #define GL2PS_TEXT_CR 3 172 #define GL2PS_TEXT_B 4 173 #define GL2PS_TEXT_BL 5 174 #define GL2PS_TEXT_BR 6 175 #define GL2PS_TEXT_T 7 176 #define GL2PS_TEXT_TL 8 177 #define GL2PS_TEXT_TR 9 167 178 168 179 typedef GLfloat GL2PSrgba[4]; 169 typedef GLfloat GL2PSxyz[3]; 170 typedef GLfloat GL2PSplane[4]; 171 172 typedef struct _GL2PSbsptree2d GL2PSbsptree2d; 173 174 struct _GL2PSbsptree2d { 175 GL2PSplane plane; 176 GL2PSbsptree2d *front, *back; 177 }; 178 179 typedef struct { 180 GLint nmax, size, incr, n; 181 char *array; 182 } GL2PSlist; 183 184 typedef struct _GL2PSbsptree GL2PSbsptree; 185 186 struct _GL2PSbsptree { 187 GL2PSplane plane; 188 GL2PSlist *primitives; 189 GL2PSbsptree *front, *back; 190 }; 191 192 typedef struct { 193 GL2PSxyz xyz; 194 GL2PSrgba rgba; 195 } GL2PSvertex; 196 197 typedef struct { 198 GLshort fontsize; 199 char *str, *fontname; 200 } GL2PSstring; 201 202 typedef struct { 203 GLsizei width, height; 204 GLenum format, type; 205 GLfloat *pixels; 206 } GL2PSimage; 207 208 typedef struct { 209 GLshort type, numverts; 210 char boundary, dash, culled; 211 GLfloat width, depth; 212 GL2PSvertex *verts; 213 GL2PSstring *text; 214 GL2PSimage *image; 215 } GL2PSprimitive; 216 217 typedef struct { 218 GLint format, sort, options, colorsize, colormode, buffersize, maxbestroot; 219 const char *title, *producer, *filename; 220 GLboolean shade, boundary; 221 GLfloat *feedback, offset[2]; 222 GLint viewport[4]; 223 GL2PSrgba *colormap, lastrgba, threshold; 224 float lastlinewidth; 225 GL2PSlist *primitives; 226 GL2PSbsptree2d *imagetree; 227 FILE *stream; 228 } GL2PScontext; 229 230 /* public functions */ 231 232 #ifdef __cplusplus 180 181 #if defined(__cplusplus) 233 182 extern "C" { 234 183 #endif 235 184 236 185 GL2PSDLL_API GLint gl2psBeginPage(const char *title, const char *producer, 237 GLint viewport[4], GLint format, GLint sort,238 GLint options, GLint colormode,239 GLint colorsize, GL2PSrgba *colormap,240 GLint nr, GLint ng, GLint nb, GLint buffersize,241 FILE *stream, const char *filename);186 GLint viewport[4], GLint format, GLint sort, 187 GLint options, GLint colormode, 188 GLint colorsize, GL2PSrgba *colormap, 189 GLint nr, GLint ng, GLint nb, GLint buffersize, 190 FILE *stream, const char *filename); 242 191 GL2PSDLL_API GLint gl2psEndPage(void); 192 GL2PSDLL_API GLint gl2psSetOptions(GLint options); 193 GL2PSDLL_API GLint gl2psGetOptions(GLint *options); 243 194 GL2PSDLL_API GLint gl2psBeginViewport(GLint viewport[4]); 244 195 GL2PSDLL_API GLint gl2psEndViewport(void); 245 GL2PSDLL_API GLint gl2psText(const char *str, const char *fontname, GLshort fontsize); 196 GL2PSDLL_API GLint gl2psText(const char *str, const char *fontname, 197 GLshort fontsize); 198 GL2PSDLL_API GLint gl2psTextOpt(const char *str, const char *fontname, 199 GLshort fontsize, GLint align, GLfloat angle); 200 GL2PSDLL_API GLint gl2psSpecial(GLint format, const char *str); 246 201 GL2PSDLL_API GLint gl2psDrawPixels(GLsizei width, GLsizei height, 247 GLint xorig, GLint yorig,248 GLenum format, GLenum type, const void *pixels);202 GLint xorig, GLint yorig, 203 GLenum format, GLenum type, const void *pixels); 249 204 GL2PSDLL_API GLint gl2psEnable(GLint mode); 250 205 GL2PSDLL_API GLint gl2psDisable(GLint mode); 251 206 GL2PSDLL_API GLint gl2psPointSize(GLfloat value); 252 207 GL2PSDLL_API GLint gl2psLineWidth(GLfloat value); 253 254 #ifdef __cplusplus 208 GL2PSDLL_API GLint gl2psBlendFunc(GLenum sfactor, GLenum dfactor); 209 210 /* undocumented */ 211 GL2PSDLL_API GLint gl2psDrawImageMap(GLsizei width, GLsizei height, 212 const GLfloat position[3], 213 const unsigned char *imagemap); 214 GL2PSDLL_API const char *gl2psGetFileExtension(GLint format); 215 GL2PSDLL_API const char *gl2psGetFormatDescription(GLint format); 216 217 #if defined(__cplusplus) 255 218 } 256 219 #endif
Note:
See TracChangeset
for help on using the changeset viewer.
