gl2ps.h   gl2ps.h 
/* $Id: gl2ps.h,v 1.61 2003/09/22 17:06:38 geuzaine Exp $ */ /* $Id: gl2ps.h,v 1.70 2003/11/03 19:26:28 geuzaine Exp $ */
/* /*
* GL2PS, an OpenGL to PostScript Printing Library * GL2PS, an OpenGL to PostScript Printing Library
* Copyright (C) 1999-2003 Christophe Geuzaine <geuz@geuz.org> * Copyright (C) 1999-2003 Christophe Geuzaine <geuz@geuz.org>
* *
* This library is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public * modify it under the terms of either:
* License as published by the Free Software Foundation; either *
* a) the GNU Library General Public License as published by the Free
* Software Foundation, either version 2 of the License, or (at your
* option) any later version; or
*
* b) the GL2PS License as published by Christophe Geuzaine, either
* version 2 of the License, or (at your option) any later version. * version 2 of the License, or (at your option) any later version.
* *
* This library is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful, but
* but WITHOUT ANY WARRANTY; without even the implied warranty of * WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either
* Library General Public License for more details. * the GNU Library General Public License or the GL2PS License for
* more details.
* *
* You should have received a copy of the GNU Library General Public * You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free * License along with this library in the file named "COPYING.LGPL";
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * if not, write to the Free Software Foundation, Inc., 675 Mass Ave,
* Cambridge, MA 02139, USA.
*
* You should have received a copy of the GL2PS License with this
* library in the file named "COPYING.GL2PS"; if not, I will be glad
* to provide one.
* *
* For the latest info about gl2ps, see http://www.geuz.org/gl2ps/ * For the latest info about gl2ps, see http://www.geuz.org/gl2ps/
*/ */
#ifndef __GL2PS_H__ #ifndef __GL2PS_H__
#define __GL2PS_H__ #define __GL2PS_H__
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <math.h> #include <math.h>
skipping to change at line 53 skipping to change at line 64
#else #else
# define GL2PSDLL_API # define GL2PSDLL_API
#endif #endif
#ifdef __APPLE__ #ifdef __APPLE__
# include <OpenGL/gl.h> # include <OpenGL/gl.h>
#else #else
# include <GL/gl.h> # include <GL/gl.h>
#endif #endif
/* Support for compressed PDF */
#if defined(HAVE_ZLIB) || defined(HAVE_LIBZ) || defined(GL2PS_HAVE_ZLIB)
# include <zlib.h>
# ifndef GL2PS_HAVE_ZLIB
# define GL2PS_HAVE_ZLIB
# endif
#endif
/* Version number */ /* Version number */
#define GL2PS_MAJOR_VERSION 1 #define GL2PS_MAJOR_VERSION 1
#define GL2PS_MINOR_VERSION 0 #define GL2PS_MINOR_VERSION 1
#define GL2PS_PATCH_VERSION 0 #define GL2PS_PATCH_VERSION 0
#define GL2PS_VERSION (GL2PS_MAJOR_VERSION + \ #define GL2PS_VERSION (GL2PS_MAJOR_VERSION + \
0.01 * GL2PS_MINOR_VERSION + \ 0.01 * GL2PS_MINOR_VERSION + \
0.0001 * GL2PS_PATCH_VERSION) 0.0001 * GL2PS_PATCH_VERSION)
/* Output file format */ /* Output file format */
#define GL2PS_PS 1 #define GL2PS_PS 1
#define GL2PS_EPS 2 #define GL2PS_EPS 2
#define GL2PS_TEX 3 #define GL2PS_TEX 3
#define GL2PS_PDF 4 #define GL2PS_PDF 4
/* Sorting algorithms */ /* Sorting algorithms */
#define GL2PS_NO_SORT 1 #define GL2PS_NO_SORT 1
#define GL2PS_SIMPLE_SORT 2 #define GL2PS_SIMPLE_SORT 2
#define GL2PS_BSP_SORT 3 #define GL2PS_BSP_SORT 3
/* Options for gl2psBeginPage */ /* Options for gl2psBeginPage */
#define GL2PS_NONE 0 #define GL2PS_NONE 0
#define GL2PS_DRAW_BACKGROUND (1<<0) #define GL2PS_DRAW_BACKGROUND (1<<0)
#define GL2PS_SIMPLE_LINE_OFFSET (1<<1) #define GL2PS_SIMPLE_LINE_OFFSET (1<<1)
#define GL2PS_SILENT (1<<2) #define GL2PS_SILENT (1<<2)
#define GL2PS_BEST_ROOT (1<<3) #define GL2PS_BEST_ROOT (1<<3)
#define GL2PS_OCCLUSION_CULL (1<<4) #define GL2PS_OCCLUSION_CULL (1<<4)
#define GL2PS_NO_TEXT (1<<5) #define GL2PS_NO_TEXT (1<<5)
#define GL2PS_LANDSCAPE (1<<6) #define GL2PS_LANDSCAPE (1<<6)
#define GL2PS_NO_PS3_SHADING (1<<7) #define GL2PS_NO_PS3_SHADING (1<<7)
#define GL2PS_NO_PIXMAP (1<<8) #define GL2PS_NO_PIXMAP (1<<8)
#define GL2PS_USE_CURRENT_VIEWPORT (1<<9) #define GL2PS_USE_CURRENT_VIEWPORT (1<<9)
#define GL2PS_DEFLATE (1<<10) #define GL2PS_COMPRESS (1<<10)
/* Arguments for gl2psEnable/gl2psDisable */ /* Arguments for gl2psEnable/gl2psDisable */
#define GL2PS_POLYGON_OFFSET_FILL 1 #define GL2PS_POLYGON_OFFSET_FILL 1
#define GL2PS_POLYGON_BOUNDARY 2 #define GL2PS_POLYGON_BOUNDARY 2
#define GL2PS_LINE_STIPPLE 3 #define GL2PS_LINE_STIPPLE 3
/* Magic numbers */ /* Magic numbers */
#define GL2PS_EPSILON 5.e-3 #define GL2PS_EPSILON 5.0e-3F
#define GL2PS_DEPTH_FACT 1000.0 #define GL2PS_DEPTH_FACT 1000.0F
#define GL2PS_SIMPLE_OFFSET 0.05 #define GL2PS_SIMPLE_OFFSET 0.05F
#define GL2PS_SIMPLE_OFFSET_LARGE 1.0 #define GL2PS_SIMPLE_OFFSET_LARGE 1.0F
#define GL2PS_ZERO(arg) (fabs(arg)<1.e-20) #define GL2PS_ZERO(arg) (fabs(arg)<1.e-20)
#define GL2PS_FIXED_XREF_ENTRIES 7 #define GL2PS_FIXED_XREF_ENTRIES 7
/* Message levels and error codes */ /* Message levels and error codes */
#define GL2PS_SUCCESS 0 #define GL2PS_SUCCESS 0
#define GL2PS_INFO 1 #define GL2PS_INFO 1
#define GL2PS_WARNING 2 #define GL2PS_WARNING 2
#define GL2PS_ERROR 3 #define GL2PS_ERROR 3
#define GL2PS_NO_FEEDBACK 4 #define GL2PS_NO_FEEDBACK 4
skipping to change at line 215 skipping to change at line 235
typedef struct { typedef struct {
GLshort type, numverts; GLshort type, numverts;
char boundary, dash, culled; char boundary, dash, culled;
GLfloat width, depth; GLfloat width, depth;
GL2PSvertex *verts; GL2PSvertex *verts;
GL2PSstring *text; GL2PSstring *text;
GL2PSimage *image; GL2PSimage *image;
} GL2PSprimitive; } GL2PSprimitive;
typedef struct { typedef struct {
#ifdef GL2PS_HAVE_ZLIB
Bytef *dest, *src, *start;
uLongf destLen, srcLen;
#else
int dummy;
#endif
} GL2PScompress;
typedef struct {
/* general */ /* general */
GLint format, sort, options, colorsize, colormode, buffersize; GLint format, sort, options, colorsize, colormode, buffersize;
const char *title, *producer, *filename; const char *title, *producer, *filename;
GLboolean boundary; GLboolean boundary;
GLfloat *feedback, offset[2]; GLfloat *feedback, offset[2], lastlinewidth;
GLint viewport[4]; GLint viewport[4];
GL2PSrgba *colormap, lastrgba, threshold; GL2PSrgba *colormap, lastrgba, threshold;
float lastlinewidth;
GL2PSlist *primitives; GL2PSlist *primitives;
FILE *stream; FILE *stream;
GL2PScompress *compress;
/* BSP-specific */ /* BSP-specific */
GLint maxbestroot; GLint maxbestroot;
/* occlusion culling-specific */ /* occlusion culling-specific */
GLboolean zerosurfacearea; GLboolean zerosurfacearea;
GL2PSbsptree2d *imagetree; GL2PSbsptree2d *imagetree;
GL2PSprimitive *primitivetoadd; GL2PSprimitive *primitivetoadd;
/* PDF-specific */ /* PDF-specific */
 End of changes. 13 change blocks. 
22 lines changed or deleted 51 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/