gl2ps.h | gl2ps.h | |||
---|---|---|---|---|
/* $Id: gl2ps.h,v 1.70 2003/11/03 19:26:28 geuzaine Exp $ */ | /* $Id: gl2ps.h,v 1.75 2003/11/10 01:29:56 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 program 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 either: | * modify it under the terms of either: | |||
* | * | |||
* a) the GNU Library General Public License as published by the Free | * a) the GNU Library General Public License as published by the Free | |||
* Software Foundation, either version 2 of the License, or (at your | * Software Foundation, either version 2 of the License, or (at your | |||
* option) any later version; or | * option) any later version; or | |||
skipping to change at line 31 | skipping to change at line 31 | |||
* | * | |||
* 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 in the file named "COPYING.LGPL"; | * License along with this library in the file named "COPYING.LGPL"; | |||
* if not, write to the Free Software Foundation, Inc., 675 Mass Ave, | * if not, write to the Free Software Foundation, Inc., 675 Mass Ave, | |||
* Cambridge, MA 02139, USA. | * Cambridge, MA 02139, USA. | |||
* | * | |||
* You should have received a copy of the GL2PS License with this | * 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 | * library in the file named "COPYING.GL2PS"; if not, I will be glad | |||
* to provide one. | * 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/. | |||
* Please report all bugs and problems to <gl2ps@geuz.org>. | ||||
*/ | */ | |||
#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> | |||
/* To generate a Windows dll, define GL2PSDLL at compile time */ | /* To generate a Windows dll, define GL2PSDLL at compile time */ | |||
skipping to change at line 77 | skipping to change at line 78 | |||
# include <zlib.h> | # include <zlib.h> | |||
# ifndef GL2PS_HAVE_ZLIB | # ifndef GL2PS_HAVE_ZLIB | |||
# define GL2PS_HAVE_ZLIB | # define GL2PS_HAVE_ZLIB | |||
# endif | # endif | |||
#endif | #endif | |||
/* Version number */ | /* Version number */ | |||
#define GL2PS_MAJOR_VERSION 1 | #define GL2PS_MAJOR_VERSION 1 | |||
#define GL2PS_MINOR_VERSION 1 | #define GL2PS_MINOR_VERSION 1 | |||
#define GL2PS_PATCH_VERSION 0 | #define GL2PS_PATCH_VERSION 1 | |||
#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 | |||
skipping to change at line 230 | skipping to change at line 231 | |||
GLsizei width, height; | GLsizei width, height; | |||
GLenum format, type; | GLenum format, type; | |||
GLfloat *pixels; | GLfloat *pixels; | |||
} GL2PSimage; | } GL2PSimage; | |||
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; | union { | |||
GL2PSimage *image; | GL2PSstring *text; | |||
GL2PSimage *image; | ||||
} data; | ||||
} GL2PSprimitive; | } GL2PSprimitive; | |||
typedef struct { | typedef struct { | |||
#ifdef GL2PS_HAVE_ZLIB | #ifdef GL2PS_HAVE_ZLIB | |||
Bytef *dest, *src, *start; | Bytef *dest, *src, *start; | |||
uLongf destLen, srcLen; | uLongf destLen, srcLen; | |||
#else | #else | |||
int dummy; | int dummy; | |||
#endif | #endif | |||
} GL2PScompress; | } GL2PScompress; | |||
skipping to change at line 278 | skipping to change at line 281 | |||
int line_width_diff, line_rgb_diff, last_line_finished, last_triangle_fin ished; | int line_width_diff, line_rgb_diff, last_line_finished, last_triangle_fin ished; | |||
} GL2PScontext; | } GL2PScontext; | |||
/* public functions */ | /* public functions */ | |||
#ifdef __cplusplus | #ifdef __cplusplus | |||
extern "C" { | extern "C" { | |||
#endif | #endif | |||
GL2PSDLL_API GLint gl2psBeginPage(const char *title, const char *producer, | GL2PSDLL_API GLint gl2psBeginPage(const char *title, const char *producer, | |||
GLint viewport[4], GLint format, GLint sor | GLint viewport[4], GLint format, GLint so | |||
t, | rt, | |||
GLint options, GLint colormode, | GLint options, GLint colormode, | |||
GLint colorsize, GL2PSrgba *colormap, | GLint colorsize, GL2PSrgba *colormap, | |||
GLint nr, GLint ng, GLint nb, GLint buffer | GLint nr, GLint ng, GLint nb, GLint buffe | |||
size, | rsize, | |||
FILE *stream, const char *filename); | FILE *stream, const char *filename); | |||
GL2PSDLL_API GLint gl2psEndPage(void); | GL2PSDLL_API GLint gl2psEndPage(void); | |||
GL2PSDLL_API GLint gl2psBeginViewport(GLint viewport[4]); | GL2PSDLL_API GLint gl2psBeginViewport(GLint viewport[4]); | |||
GL2PSDLL_API GLint gl2psEndViewport(void); | GL2PSDLL_API GLint gl2psEndViewport(void); | |||
GL2PSDLL_API GLint gl2psText(const char *str, const char *fontname, GLshort fontsize); | GL2PSDLL_API GLint gl2psText(const char *str, const char *fontname, GLshort fontsize); | |||
GL2PSDLL_API GLint gl2psDrawPixels(GLsizei width, GLsizei height, | GL2PSDLL_API GLint gl2psDrawPixels(GLsizei width, GLsizei height, | |||
GLint xorig, GLint yorig, | GLint xorig, GLint yorig, | |||
GLenum format, GLenum type, const void *p | GLenum format, GLenum type, const void * | |||
ixels); | pixels); | |||
GL2PSDLL_API GLint gl2psEnable(GLint mode); | GL2PSDLL_API GLint gl2psEnable(GLint mode); | |||
GL2PSDLL_API GLint gl2psDisable(GLint mode); | GL2PSDLL_API GLint gl2psDisable(GLint mode); | |||
GL2PSDLL_API GLint gl2psPointSize(GLfloat value); | GL2PSDLL_API GLint gl2psPointSize(GLfloat value); | |||
GL2PSDLL_API GLint gl2psLineWidth(GLfloat value); | GL2PSDLL_API GLint gl2psLineWidth(GLfloat value); | |||
/* Undocumented */ | /* Undocumented */ | |||
GL2PSDLL_API GLint gl2psTextOpt(const char *str, const char *fontname, GLsh ort fontsize, | GL2PSDLL_API GLint gl2psTextOpt(const char *str, const char *fontname, GLsh ort fontsize, | |||
GLint align, GL2PSrgba color); | GLint align, GL2PSrgba color); | |||
#ifdef __cplusplus | #ifdef __cplusplus | |||
}; | }; | |||
#endif | #endif | |||
#endif /* __GL2PS_H__ */ | #endif /* __GL2PS_H__ */ | |||
End of changes. 7 change blocks. | ||||
16 lines changed or deleted | 19 lines changed or added | |||