Classes | Defines | Typedefs | Enumerations | Functions | Variables

gl2ps.c File Reference

#include "gl2ps.h"
#include <math.h>
#include <string.h>
#include <sys/types.h>
#include <stdarg.h>
#include <time.h>
#include <float.h>
Include dependency graph for gl2ps.c:

Go to the source code of this file.

Classes

struct  _GL2PSbsptree
struct  _GL2PSbsptree2d
struct  _GL2PSimagemap
struct  GL2PSbackend
struct  GL2PScompress
struct  GL2PScontext
struct  GL2PSimage
struct  GL2PSlist
struct  GL2PSpdfgroup
struct  GL2PSprimitive
struct  GL2PSstring
struct  GL2PStriangle
struct  GL2PSvertex

Defines

#define GL2PS_BEGIN_BLEND_TOKEN   9
#define GL2PS_BEGIN_BOUNDARY_TOKEN   3
#define GL2PS_BEGIN_OFFSET_TOKEN   1
#define GL2PS_BEGIN_STIPPLE_TOKEN   5
#define GL2PS_COINCIDENT   1
#define GL2PS_DRAW_PIXELS_TOKEN   14
#define GL2PS_DST_BLEND_TOKEN   12
#define GL2PS_END_BLEND_TOKEN   10
#define GL2PS_END_BOUNDARY_TOKEN   4
#define GL2PS_END_OFFSET_TOKEN   2
#define GL2PS_END_STIPPLE_TOKEN   6
#define GL2PS_EPSILON   5.0e-3F
#define GL2PS_IMAGEMAP   7
#define GL2PS_IMAGEMAP_TOKEN   13
#define GL2PS_IMAGEMAP_VISIBLE   9
#define GL2PS_IMAGEMAP_WRITTEN   8
#define GL2PS_IN_BACK_OF   3
#define GL2PS_IN_FRONT_OF   2
#define GL2PS_LINE   3
#define GL2PS_LINE_WIDTH_TOKEN   8
#define GL2PS_NO_TYPE   -1
#define GL2PS_PIXMAP   6
#define GL2PS_POINT   2
#define GL2PS_POINT_BACK   2
#define GL2PS_POINT_COINCIDENT   0
#define GL2PS_POINT_INFRONT   1
#define GL2PS_POINT_SIZE_TOKEN   7
#define GL2PS_QUADRANGLE   4
#define GL2PS_SPANNING   4
#define GL2PS_SPECIAL   10
#define GL2PS_SRC_BLEND_TOKEN   11
#define GL2PS_TEXT   1
#define GL2PS_TEXT_TOKEN   15
#define GL2PS_TRIANGLE   5
#define GL2PS_ZERO(arg)   (fabs(arg) < 1.e-20)
#define GL2PS_ZOFFSET   5.0e-2F
#define GL2PS_ZOFFSET_LARGE   20.0F
#define GL2PS_ZSCALE   1000.0F

Typedefs

typedef struct _GL2PSbsptree GL2PSbsptree
typedef struct _GL2PSbsptree2d GL2PSbsptree2d
typedef struct _GL2PSimagemap GL2PSimagemap
typedef GLfloat GL2PSplane [4]
typedef GLfloat GL2PSxyz [3]

Enumerations

enum  GL2PS_TRIANGLE_PROPERTY {
  T_UNDEFINED = -1, T_CONST_COLOR = 1, T_VAR_COLOR = 1<<1, T_ALPHA_1 = 1<<2,
  T_ALPHA_LESS_1 = 1<<3, T_VAR_ALPHA = 1<<4
}

Functions

static void gl2psAdaptVertexForBlending (GL2PSvertex *v)
static void gl2psAddBoundaryInList (GL2PSprimitive *prim, GL2PSlist *list)
static GLint gl2psAddInBspImageTree (GL2PSprimitive *prim, GL2PSbsptree2d **tree)
static void gl2psAddIndex (GLshort *index0, GLshort *index1, GLshort *nb, GLshort i, GLshort j)
static void gl2psAddInImageTree (void *data)
static void gl2psAddPlanesInBspTreeImage (GL2PSprimitive *prim, GL2PSbsptree2d **tree)
static void gl2psAddPolyPrimitive (GLshort type, GLshort numverts, GL2PSvertex *verts, GLint offset, GLushort pattern, GLint factor, GLfloat width, char boundary)
static void gl2psAddPrimitiveInList (GL2PSprimitive *prim, GL2PSlist *list)
static GLint gl2psAddText (GLint type, const char *str, const char *fontname, GLshort fontsize, GLint alignment, GLfloat angle)
static void gl2psAssignTriangleProperties (GL2PStriangle *t)
GL2PSDLL_API GLint gl2psBeginPage (const char *title, const char *producer, GLint viewport[4], GLint format, GLint sort, GLint options, GLint colormode, GLint colorsize, GL2PSrgba *colormap, GLint nr, GLint ng, GLint nb, GLint buffersize, FILE *stream, const char *filename)
GL2PSDLL_API GLint gl2psBeginViewport (GLint viewport[4])
GL2PSDLL_API GLint gl2psBlendFunc (GLenum sfactor, GLenum dfactor)
static void gl2psBuildBspTree (GL2PSbsptree *tree, GL2PSlist *primitives)
static void gl2psBuildPolygonBoundary (GL2PSbsptree *tree)
static GLint gl2psCheckPoint (GL2PSxyz point, GL2PSplane plane)
static GLint gl2psCheckPrimitive (GL2PSprimitive *prim, GL2PSplane plane)
static int gl2psClosePDFDataStream (void)
static int gl2psCompareDepth (const void *a, const void *b)
static GLfloat gl2psComparePointPlane (GL2PSxyz point, GL2PSplane plane)
static void gl2psComputeTightBoundingBox (void *data)
static GL2PSimagegl2psCopyPixmap (GL2PSimage *im)
static GL2PSprimitivegl2psCopyPrimitive (GL2PSprimitive *p)
static GL2PSstringgl2psCopyText (GL2PSstring *t)
static void gl2psCreateSplitPrimitive (GL2PSprimitive *parent, GL2PSplane plane, GL2PSprimitive *child, GLshort numverts, GLshort *index0, GLshort *index1)
static GL2PSprimitivegl2psCreateSplitPrimitive2D (GL2PSprimitive *parent, GLshort numverts, GL2PSvertex *vertx)
static void gl2psCutEdge (GL2PSvertex *a, GL2PSvertex *b, GL2PSplane plane, GL2PSvertex *c)
GL2PSDLL_API GLint gl2psDisable (GLint mode)
static void gl2psDivideQuad (GL2PSprimitive *quad, GL2PSprimitive **t1, GL2PSprimitive **t2)
GL2PSDLL_API GLint gl2psDrawImageMap (GLsizei width, GLsizei height, const GLfloat position[3], const unsigned char *imagemap)
GL2PSDLL_API GLint gl2psDrawPixels (GLsizei width, GLsizei height, GLint xorig, GLint yorig, GLenum format, GLenum type, const void *pixels)
GL2PSDLL_API GLint gl2psEnable (GLint mode)
GL2PSDLL_API GLint gl2psEndPage (void)
static void gl2psEndPostScriptLine (void)
static void gl2psEndSVGLine (void)
GL2PSDLL_API GLint gl2psEndViewport (void)
static void gl2psFillTriangleFromPrimitive (GL2PStriangle *t, GL2PSprimitive *p, GLboolean assignprops)
static GLint gl2psFindRoot (GL2PSlist *primitives, GL2PSprimitive **root)
static void gl2psFree (void *ptr)
static void gl2psFreeBspImageTree (GL2PSbsptree2d **tree)
static void gl2psFreeBspTree (GL2PSbsptree **tree)
static void gl2psFreeImagemap (GL2PSimagemap *list)
static void gl2psFreePixmap (GL2PSimage *im)
static void gl2psFreePrimitive (void *data)
static void gl2psFreeText (GL2PSstring *text)
GL2PSDLL_API const chargl2psGetFileExtension (GLint format)
GL2PSDLL_API const chargl2psGetFormatDescription (GLint format)
static GLshort gl2psGetIndex (GLshort i, GLshort num)
static void gl2psGetNormal (GLfloat *a, GLfloat *b, GLfloat *c)
GL2PSDLL_API GLint gl2psGetOptions (GLint *options)
static void gl2psGetPlane (GL2PSprimitive *prim, GL2PSplane plane)
static GLint gl2psGetPlaneFromPoints (GL2PSxyz a, GL2PSxyz b, GL2PSplane plane)
static GLfloat gl2psGetRGB (GL2PSimage *im, GLuint x, GLuint y, GLfloat *red, GLfloat *green, GLfloat *blue)
static GLint gl2psGetVertex (GL2PSvertex *v, GLfloat *p)
static GLboolean gl2psGreater (GLfloat f1, GLfloat f2)
static void gl2psInitTriangle (GL2PStriangle *t)
static GLboolean gl2psLess (GLfloat f1, GLfloat f2)
GL2PSDLL_API GLint gl2psLineWidth (GLfloat value)
static void gl2psListAction (GL2PSlist *list, void(*action)(void *data))
static void gl2psListActionInverse (GL2PSlist *list, void(*action)(void *data))
static void gl2psListAdd (GL2PSlist *list, void *data)
static GL2PSlistgl2psListCreate (GLint n, GLint incr, GLint size)
static void gl2psListDelete (GL2PSlist *list)
static int gl2psListNbr (GL2PSlist *list)
static void * gl2psListPointer (GL2PSlist *list, GLint index)
static void gl2psListRealloc (GL2PSlist *list, GLint n)
static void gl2psListReset (GL2PSlist *list)
static void gl2psListSort (GL2PSlist *list, int(*fcmp)(const void *a, const void *b))
static void * gl2psMalloc (size_t size)
static void gl2psMsg (GLint level, const char *fmt,...)
static GLfloat gl2psNorm (GLfloat *a)
static int gl2psOpenPDFDataStream (void)
static int gl2psOpenPDFDataStreamWritePreface (void)
static void gl2psParseFeedbackBuffer (GLint used)
static void gl2psParseStipplePattern (GLushort pattern, GLint factor, int *nb, int array[10])
static void gl2psPDFgroupListDelete (void)
static void gl2psPDFgroupListInit (void)
static int gl2psPDFgroupListWriteFontResources (void)
static int gl2psPDFgroupListWriteGStateResources (void)
static void gl2psPDFgroupListWriteMainStream (void)
static int gl2psPDFgroupListWriteObjects (int entryoffs)
static int gl2psPDFgroupListWriteShaderResources (void)
static int gl2psPDFgroupListWriteVariableResources (void)
static int gl2psPDFgroupListWriteXObjectResources (void)
static void gl2psPDFgroupObjectInit (GL2PSpdfgroup *gro)
static void gl2psPDFRectHull (GLfloat *xmin, GLfloat *xmax, GLfloat *ymin, GLfloat *ymax, GL2PStriangle *triangles, int cnt)
static void gl2psPDFstacksInit (void)
static const chargl2psPGFTextAlignment (int align)
GL2PSDLL_API GLint gl2psPointSize (GLfloat value)
static int gl2psPrintf (const char *fmt,...)
static void gl2psPrintGzipFooter (void)
static void gl2psPrintGzipHeader (void)
static void gl2psPrintPDFBeginViewport (GLint viewport[4])
static int gl2psPrintPDFCatalog (void)
static int gl2psPrintPDFCompressorType (void)
static int gl2psPrintPDFDataStreamLength (int val)
static GLint gl2psPrintPDFEndViewport (void)
static int gl2psPrintPDFFillColor (GL2PSrgba rgba)
static void gl2psPrintPDFFinalPrimitive (void)
static void gl2psPrintPDFFooter (void)
static int gl2psPrintPDFGSObject (void)
static void gl2psPrintPDFHeader (void)
static int gl2psPrintPDFInfo (void)
static int gl2psPrintPDFLineWidth (GLfloat lw)
static int gl2psPrintPDFOpenPage (void)
static int gl2psPrintPDFPages (void)
static int gl2psPrintPDFPixmap (int obj, int childobj, GL2PSimage *im, int gray)
static int gl2psPrintPDFPixmapStreamData (GL2PSimage *im, int(*action)(unsigned long data, int size), int gray)
static void gl2psPrintPDFPrimitive (void *data)
static int gl2psPrintPDFShader (int obj, GL2PStriangle *triangles, int size, int gray)
static int gl2psPrintPDFShaderExtGS (int obj, int childobj)
static int gl2psPrintPDFShaderMask (int obj, int childobj)
static int gl2psPrintPDFShaderSimpleExtGS (int obj, GLfloat alpha)
static int gl2psPrintPDFShaderStreamData (GL2PStriangle *triangle, GLfloat dx, GLfloat dy, GLfloat xmin, GLfloat ymin, int(*action)(unsigned long data, int size), int gray)
static int gl2psPrintPDFShaderStreamDataAlpha (GL2PSvertex *vertex, int(*action)(unsigned long data, int size), int sigbyte)
static int gl2psPrintPDFShaderStreamDataCoord (GL2PSvertex *vertex, int(*action)(unsigned long data, int size), GLfloat dx, GLfloat dy, GLfloat xmin, GLfloat ymin)
static int gl2psPrintPDFShaderStreamDataRGB (GL2PSvertex *vertex, int(*action)(unsigned long data, int size))
static int gl2psPrintPDFStrokeColor (GL2PSrgba rgba)
static int gl2psPrintPDFText (int obj, GL2PSstring *s, int fontnumber)
static void gl2psPrintPGFBeginViewport (GLint viewport[4])
static void gl2psPrintPGFColor (GL2PSrgba rgba)
static void gl2psPrintPGFDash (GLushort pattern, GLint factor)
static GLint gl2psPrintPGFEndViewport (void)
static void gl2psPrintPGFFinalPrimitive (void)
static void gl2psPrintPGFFooter (void)
static void gl2psPrintPGFHeader (void)
static void gl2psPrintPGFPrimitive (void *data)
static void gl2psPrintPostScriptBeginViewport (GLint viewport[4])
static void gl2psPrintPostScriptColor (GL2PSrgba rgba)
static int gl2psPrintPostScriptDash (GLushort pattern, GLint factor, const char *str)
static GLint gl2psPrintPostScriptEndViewport (void)
static void gl2psPrintPostScriptFinalPrimitive (void)
static void gl2psPrintPostScriptFooter (void)
static void gl2psPrintPostScriptHeader (void)
static void gl2psPrintPostScriptImagemap (GLfloat x, GLfloat y, GLsizei width, GLsizei height, const unsigned char *imagemap)
static void gl2psPrintPostScriptPixmap (GLfloat x, GLfloat y, GL2PSimage *im)
static void gl2psPrintPostScriptPrimitive (void *data)
static GLint gl2psPrintPrimitives (void)
static void gl2psPrintSVGBeginViewport (GLint viewport[4])
static void gl2psPrintSVGDash (GLushort pattern, GLint factor)
static GLint gl2psPrintSVGEndViewport (void)
static void gl2psPrintSVGFinalPrimitive (void)
static void gl2psPrintSVGFooter (void)
static void gl2psPrintSVGHeader (void)
static void gl2psPrintSVGPixmap (GLfloat x, GLfloat y, GL2PSimage *pixmap)
static void gl2psPrintSVGPrimitive (void *data)
static void gl2psPrintSVGSmoothTriangle (GL2PSxyz xyz[3], GL2PSrgba rgba[3])
static void gl2psPrintTeXBeginViewport (GLint viewport[4])
static GLint gl2psPrintTeXEndViewport (void)
static void gl2psPrintTeXFinalPrimitive (void)
static void gl2psPrintTeXFooter (void)
static void gl2psPrintTeXHeader (void)
static void gl2psPrintTeXPrimitive (void *data)
static GLfloat gl2psPsca (GLfloat *a, GLfloat *b)
static void gl2psPutPDFImage (GL2PSimage *image, int cnt, GLfloat x, GLfloat y)
static void gl2psPutPDFText (GL2PSstring *text, int cnt, GLfloat x, GLfloat y)
static void gl2psPvec (GLfloat *a, GLfloat *b, GLfloat *c)
static void * gl2psRealloc (void *ptr, size_t size)
static void gl2psRescaleAndOffset (void)
static void gl2psResetPostScriptColor (void)
static GLboolean gl2psSameColor (GL2PSrgba rgba1, GL2PSrgba rgba2)
static GLboolean gl2psSameColorThreshold (int n, GL2PSrgba rgba[], GL2PSrgba threshold)
static GLboolean gl2psSamePosition (GL2PSxyz p1, GL2PSxyz p2)
static void gl2psSetLastColor (GL2PSrgba rgba)
GL2PSDLL_API GLint gl2psSetOptions (GLint options)
static void gl2psSortOutTrianglePDFgroup (GL2PSpdfgroup *gro)
GL2PSDLL_API GLint gl2psSpecial (GLint format, const char *str)
static GLint gl2psSplitPrimitive (GL2PSprimitive *prim, GL2PSplane plane, GL2PSprimitive **front, GL2PSprimitive **back)
static void gl2psSplitPrimitive2D (GL2PSprimitive *prim, GL2PSplane plane, GL2PSprimitive **front, GL2PSprimitive **back)
static GLboolean gl2psSupportedBlendMode (GLenum sfactor, GLenum dfactor)
static void gl2psSVGGetColorString (GL2PSrgba rgba, char str[32])
static void gl2psSVGGetCoordsAndColors (int n, GL2PSvertex *verts, GL2PSxyz *xyz, GL2PSrgba *rgba)
static GLint gl2psTestSplitPrimitive (GL2PSprimitive *prim, GL2PSplane plane)
GL2PSDLL_API GLint gl2psText (const char *str, const char *fontname, GLshort fontsize)
GL2PSDLL_API GLint gl2psTextOpt (const char *str, const char *fontname, GLshort fontsize, GLint alignment, GLfloat angle)
static void gl2psTraverseBspTree (GL2PSbsptree *tree, GL2PSxyz eye, GLfloat epsilon, GLboolean(*compare)(GLfloat f1, GLfloat f2), void(*action)(void *data), int inverse)
static int gl2psTrianglesFirst (const void *a, const void *b)
static GLboolean gl2psVertsSameColor (const GL2PSprimitive *prim)
static int gl2psWriteBigEndian (unsigned long data, int bytes)
static void gl2psWriteByte (unsigned char byte)

Variables

static GL2PScontextgl2ps = NULL
static GL2PSbackendgl2psbackends []
static GL2PSbackend gl2psEPS
static GL2PSbackend gl2psPDF
static GL2PSbackend gl2psPGF
static GL2PSbackend gl2psPS
static GL2PSbackend gl2psSVG
static GL2PSbackend gl2psTEX

Define Documentation

#define GL2PS_BEGIN_BLEND_TOKEN   9

Definition at line 105 of file gl2ps.c.

Referenced by gl2psEnable(), and gl2psParseFeedbackBuffer().

#define GL2PS_BEGIN_BOUNDARY_TOKEN   3

Definition at line 99 of file gl2ps.c.

Referenced by gl2psEnable(), and gl2psParseFeedbackBuffer().

#define GL2PS_BEGIN_OFFSET_TOKEN   1

Definition at line 97 of file gl2ps.c.

Referenced by gl2psEnable(), and gl2psParseFeedbackBuffer().

#define GL2PS_BEGIN_STIPPLE_TOKEN   5

Definition at line 101 of file gl2ps.c.

Referenced by gl2psEnable(), and gl2psParseFeedbackBuffer().

#define GL2PS_COINCIDENT   1
#define GL2PS_DRAW_PIXELS_TOKEN   14

Definition at line 110 of file gl2ps.c.

Referenced by gl2psDrawPixels(), and gl2psParseFeedbackBuffer().

#define GL2PS_DST_BLEND_TOKEN   12

Definition at line 108 of file gl2ps.c.

Referenced by gl2psBlendFunc(), and gl2psParseFeedbackBuffer().

#define GL2PS_END_BLEND_TOKEN   10

Definition at line 106 of file gl2ps.c.

Referenced by gl2psDisable(), and gl2psParseFeedbackBuffer().

#define GL2PS_END_BOUNDARY_TOKEN   4

Definition at line 100 of file gl2ps.c.

Referenced by gl2psDisable(), and gl2psParseFeedbackBuffer().

#define GL2PS_END_OFFSET_TOKEN   2

Definition at line 98 of file gl2ps.c.

Referenced by gl2psDisable(), and gl2psParseFeedbackBuffer().

#define GL2PS_END_STIPPLE_TOKEN   6

Definition at line 102 of file gl2ps.c.

Referenced by gl2psDisable(), and gl2psParseFeedbackBuffer().

#define GL2PS_EPSILON   5.0e-3F
#define GL2PS_IMAGEMAP   7
#define GL2PS_IMAGEMAP_TOKEN   13

Definition at line 109 of file gl2ps.c.

Referenced by gl2psDrawImageMap(), and gl2psParseFeedbackBuffer().

#define GL2PS_IMAGEMAP_VISIBLE   9

Definition at line 79 of file gl2ps.c.

Referenced by gl2psAddInImageTree().

#define GL2PS_IMAGEMAP_WRITTEN   8

Definition at line 78 of file gl2ps.c.

Referenced by gl2psPrintPostScriptPrimitive().

#define GL2PS_IN_BACK_OF   3
#define GL2PS_IN_FRONT_OF   2
#define GL2PS_LINE   3
#define GL2PS_LINE_WIDTH_TOKEN   8

Definition at line 104 of file gl2ps.c.

Referenced by gl2psLineWidth(), and gl2psParseFeedbackBuffer().

#define GL2PS_NO_TYPE   -1

Definition at line 70 of file gl2ps.c.

#define GL2PS_PIXMAP   6
#define GL2PS_POINT   2
#define GL2PS_POINT_BACK   2
#define GL2PS_POINT_COINCIDENT   0

Definition at line 91 of file gl2ps.c.

Referenced by gl2psAddPlanesInBspTreeImage().

#define GL2PS_POINT_INFRONT   1
#define GL2PS_POINT_SIZE_TOKEN   7

Definition at line 103 of file gl2ps.c.

Referenced by gl2psParseFeedbackBuffer(), and gl2psPointSize().

#define GL2PS_QUADRANGLE   4
#define GL2PS_SPANNING   4

Definition at line 87 of file gl2ps.c.

Referenced by gl2psAddInBspImageTree(), gl2psBuildBspTree(), and gl2psSplitPrimitive().

#define GL2PS_SPECIAL   10
#define GL2PS_SRC_BLEND_TOKEN   11

Definition at line 107 of file gl2ps.c.

Referenced by gl2psBlendFunc(), and gl2psParseFeedbackBuffer().

#define GL2PS_TEXT   1
#define GL2PS_TEXT_TOKEN   15

Definition at line 111 of file gl2ps.c.

Referenced by gl2psAddText(), and gl2psParseFeedbackBuffer().

#define GL2PS_TRIANGLE   5
#define GL2PS_ZERO (   arg  )     (fabs(arg) < 1.e-20)
#define GL2PS_ZOFFSET   5.0e-2F

Definition at line 64 of file gl2ps.c.

#define GL2PS_ZOFFSET_LARGE   20.0F

Definition at line 65 of file gl2ps.c.

#define GL2PS_ZSCALE   1000.0F

Definition at line 63 of file gl2ps.c.

Referenced by gl2psPrintPrimitives(), and gl2psRescaleAndOffset().


Typedef Documentation

typedef struct _GL2PSbsptree GL2PSbsptree

Definition at line 137 of file gl2ps.c.

Definition at line 125 of file gl2ps.c.

typedef struct _GL2PSimagemap GL2PSimagemap

Definition at line 174 of file gl2ps.c.

typedef GLfloat GL2PSplane[4]

Definition at line 123 of file gl2ps.c.

typedef GLfloat GL2PSxyz[3]

Definition at line 122 of file gl2ps.c.


Enumeration Type Documentation

Enumerator:
T_UNDEFINED 
T_CONST_COLOR 
T_VAR_COLOR 
T_ALPHA_1 
T_ALPHA_LESS_1 
T_VAR_ALPHA 

Definition at line 113 of file gl2ps.c.


Function Documentation

static void gl2psAdaptVertexForBlending ( GL2PSvertex v  )  [static]
static void gl2psAddBoundaryInList ( GL2PSprimitive prim,
GL2PSlist list 
) [static]
static GLint gl2psAddInBspImageTree ( GL2PSprimitive prim,
GL2PSbsptree2d **  tree 
) [static]
static void gl2psAddIndex ( GLshort *  index0,
GLshort *  index1,
GLshort *  nb,
GLshort  i,
GLshort  j 
) [static]

Definition at line 1233 of file gl2ps.c.

Referenced by gl2psSplitPrimitive().

static void gl2psAddInImageTree ( void *  data  )  [static]
static void gl2psAddPlanesInBspTreeImage ( GL2PSprimitive prim,
GL2PSbsptree2d **  tree 
) [static]
static void gl2psAddPolyPrimitive ( GLshort  type,
GLshort  numverts,
GL2PSvertex verts,
GLint  offset,
GLushort  pattern,
GLint  factor,
GLfloat  width,
char  boundary 
) [static]
static void gl2psAddPrimitiveInList ( GL2PSprimitive prim,
GL2PSlist list 
) [static]
static GLint gl2psAddText ( GLint  type,
const char str,
const char fontname,
GLshort  fontsize,
GLint  alignment,
GLfloat  angle 
) [static]
static void gl2psAssignTriangleProperties ( GL2PStriangle t  )  [static]
GL2PSDLL_API GLint gl2psBeginPage ( const char title,
const char producer,
GLint  viewport[4],
GLint  format,
GLint  sort,
GLint  options,
GLint  colormode,
GLint  colorsize,
GL2PSrgba colormap,
GLint  nr,
GLint  ng,
GLint  nb,
GLint  buffersize,
FILE *  stream,
const char filename 
)
GL2PSDLL_API GLint gl2psBeginViewport ( GLint  viewport[4]  ) 

Definition at line 5800 of file gl2ps.c.

References GL2PSbackend::beginViewport, and GL2PScontext::format.

GL2PSDLL_API GLint gl2psBlendFunc ( GLenum  sfactor,
GLenum  dfactor 
)

Definition at line 6028 of file gl2ps.c.

References GL2PS_DST_BLEND_TOKEN, GL2PS_SRC_BLEND_TOKEN, and gl2psSupportedBlendMode().

static void gl2psBuildBspTree ( GL2PSbsptree tree,
GL2PSlist primitives 
) [static]
static void gl2psBuildPolygonBoundary ( GL2PSbsptree tree  )  [static]
static GLint gl2psCheckPoint ( GL2PSxyz  point,
GL2PSplane  plane 
) [static]
static GLint gl2psCheckPrimitive ( GL2PSprimitive prim,
GL2PSplane  plane 
) [static]
static int gl2psClosePDFDataStream ( void   )  [static]
static int gl2psCompareDepth ( const void *  a,
const void *  b 
) [static]

Definition at line 1367 of file gl2ps.c.

References GL2PSprimitive::numverts, GL2PSprimitive::verts, and GL2PSvertex::xyz.

Referenced by gl2psPrintPrimitives().

static GLfloat gl2psComparePointPlane ( GL2PSxyz  point,
GL2PSplane  plane 
) [static]
static void gl2psComputeTightBoundingBox ( void *  data  )  [static]
static GL2PSimage* gl2psCopyPixmap ( GL2PSimage im  )  [static]
static GL2PSprimitive* gl2psCopyPrimitive ( GL2PSprimitive p  )  [static]
static GL2PSstring* gl2psCopyText ( GL2PSstring t  )  [static]
static void gl2psCreateSplitPrimitive ( GL2PSprimitive parent,
GL2PSplane  plane,
GL2PSprimitive child,
GLshort  numverts,
GLshort *  index0,
GLshort *  index1 
) [static]
static GL2PSprimitive* gl2psCreateSplitPrimitive2D ( GL2PSprimitive parent,
GLshort  numverts,
GL2PSvertex vertx 
) [static]
static void gl2psCutEdge ( GL2PSvertex a,
GL2PSvertex b,
GL2PSplane  plane,
GL2PSvertex c 
) [static]
GL2PSDLL_API GLint gl2psDisable ( GLint  mode  ) 
static void gl2psDivideQuad ( GL2PSprimitive quad,
GL2PSprimitive **  t1,
GL2PSprimitive **  t2 
) [static]
GL2PSDLL_API GLint gl2psDrawImageMap ( GLsizei  width,
GLsizei  height,
const GLfloat  position[3],
const unsigned char imagemap 
)

Definition at line 5925 of file gl2ps.c.

References GL2PS_IMAGEMAP_TOKEN.

GL2PSDLL_API GLint gl2psDrawPixels ( GLsizei  width,
GLsizei  height,
GLint  xorig,
GLint  yorig,
GLenum  format,
GLenum  type,
const void *  pixels 
)
GL2PSDLL_API GLint gl2psEnable ( GLint  mode  ) 
GL2PSDLL_API GLint gl2psEndPage ( void   ) 
static void gl2psEndPostScriptLine ( void   )  [static]
static void gl2psEndSVGLine ( void   )  [static]
GL2PSDLL_API GLint gl2psEndViewport ( void   ) 
static void gl2psFillTriangleFromPrimitive ( GL2PStriangle t,
GL2PSprimitive p,
GLboolean  assignprops 
) [static]
static GLint gl2psFindRoot ( GL2PSlist primitives,
GL2PSprimitive **  root 
) [static]
static void gl2psFree ( void *  ptr  )  [static]
static void gl2psFreeBspImageTree ( GL2PSbsptree2d **  tree  )  [static]

Definition at line 1729 of file gl2ps.c.

References gl2psFree().

Referenced by gl2psPrintPrimitives().

static void gl2psFreeBspTree ( GL2PSbsptree **  tree  )  [static]

Definition at line 1495 of file gl2ps.c.

References gl2psFree(), gl2psFreePrimitive(), gl2psListAction(), and gl2psListDelete().

Referenced by gl2psPrintPrimitives().

static void gl2psFreeImagemap ( GL2PSimagemap list  )  [static]

Definition at line 1452 of file gl2ps.c.

References gl2psFree(), _GL2PSimagemap::image, _GL2PSimagemap::next, next, and GL2PSimage::pixels.

Referenced by gl2psEndPage().

static void gl2psFreePixmap ( GL2PSimage im  )  [static]

Definition at line 770 of file gl2ps.c.

References gl2psFree(), and GL2PSimage::pixels.

Referenced by gl2psFreePrimitive().

static void gl2psFreePrimitive ( void *  data  )  [static]
static void gl2psFreeText ( GL2PSstring text  )  [static]

Definition at line 904 of file gl2ps.c.

References GL2PSstring::fontname, gl2psFree(), and GL2PSstring::str.

Referenced by gl2psFreePrimitive().

GL2PSDLL_API const char* gl2psGetFileExtension ( GLint  format  ) 

Definition at line 6064 of file gl2ps.c.

References GL2PSbackend::file_extension.

GL2PSDLL_API const char* gl2psGetFormatDescription ( GLint  format  ) 

Definition at line 6072 of file gl2ps.c.

References GL2PSbackend::description.

static GLshort gl2psGetIndex ( GLshort  i,
GLshort  num 
) [static]

Definition at line 1247 of file gl2ps.c.

Referenced by gl2psAddBoundaryInList(), gl2psSplitPrimitive(), and gl2psTestSplitPrimitive().

static void gl2psGetNormal ( GLfloat *  a,
GLfloat *  b,
GLfloat *  c 
) [static]

Definition at line 1081 of file gl2ps.c.

References GL2PS_ZERO, gl2psNorm(), and gl2psPvec().

Referenced by gl2psGetPlane().

GL2PSDLL_API GLint gl2psGetOptions ( GLint *  options  ) 

Definition at line 6052 of file gl2ps.c.

References GL2PScontext::options.

static void gl2psGetPlane ( GL2PSprimitive prim,
GL2PSplane  plane 
) [static]
static GLint gl2psGetPlaneFromPoints ( GL2PSxyz  a,
GL2PSxyz  b,
GL2PSplane  plane 
) [static]

Definition at line 1707 of file gl2ps.c.

References GL2PS_ZERO.

Referenced by gl2psAddPlanesInBspTreeImage().

static GLfloat gl2psGetRGB ( GL2PSimage im,
GLuint  x,
GLuint  y,
GLfloat *  red,
GLfloat *  green,
GLfloat *  blue 
) [static]
static GLint gl2psGetVertex ( GL2PSvertex v,
GLfloat *  p 
) [static]
static GLboolean gl2psGreater ( GLfloat  f1,
GLfloat  f2 
) [static]

Definition at line 1509 of file gl2ps.c.

Referenced by gl2psPrintPrimitives().

static void gl2psInitTriangle ( GL2PStriangle t  )  [static]

Definition at line 993 of file gl2ps.c.

References GL2PStriangle::prop, T_UNDEFINED, and GL2PStriangle::vertex.

Referenced by gl2psPDFgroupListInit().

static GLboolean gl2psLess ( GLfloat  f1,
GLfloat  f2 
) [static]

Definition at line 1515 of file gl2ps.c.

Referenced by gl2psPrintPrimitives().

GL2PSDLL_API GLint gl2psLineWidth ( GLfloat  value  ) 

Definition at line 6018 of file gl2ps.c.

References GL2PS_LINE_WIDTH_TOKEN.

static void gl2psListAction ( GL2PSlist list,
void(*)(void *data)  action 
) [static]
static void gl2psListActionInverse ( GL2PSlist list,
void(*)(void *data)  action 
) [static]

Definition at line 603 of file gl2ps.c.

References gl2psListNbr(), and gl2psListPointer().

Referenced by gl2psPrintPrimitives(), and gl2psTraverseBspTree().

static void gl2psListAdd ( GL2PSlist list,
void *  data 
) [static]
static GL2PSlist* gl2psListCreate ( GLint  n,
GLint  incr,
GLint  size 
) [static]
static void gl2psListDelete ( GL2PSlist list  )  [static]
static int gl2psListNbr ( GL2PSlist list  )  [static]
static void* gl2psListPointer ( GL2PSlist list,
GLint  index 
) [static]
static void gl2psListRealloc ( GL2PSlist list,
GLint  n 
) [static]
static void gl2psListReset ( GL2PSlist list  )  [static]

Definition at line 542 of file gl2ps.c.

References GL2PSlist::n.

Referenced by gl2psParseFeedbackBuffer(), and gl2psPrintPrimitives().

static void gl2psListSort ( GL2PSlist list,
int(*)(const void *a, const void *b)  fcmp 
) [static]

Definition at line 586 of file gl2ps.c.

References GL2PSlist::array, GL2PSlist::n, and GL2PSlist::size.

Referenced by gl2psBuildBspTree(), and gl2psPrintPrimitives().

static void* gl2psMalloc ( size_t  size  )  [static]
static void gl2psMsg ( GLint  level,
const char fmt,
  ... 
) [static]
static GLfloat gl2psNorm ( GLfloat *  a  )  [static]

Definition at line 1076 of file gl2ps.c.

Referenced by gl2psAddBoundaryInList(), and gl2psGetNormal().

static int gl2psOpenPDFDataStream ( void   )  [static]

Definition at line 3985 of file gl2ps.c.

References gl2psPrintPDFCompressorType(), and GL2PScontext::stream.

Referenced by gl2psPrintPDFHeader().

static int gl2psOpenPDFDataStreamWritePreface ( void   )  [static]
static void gl2psParseFeedbackBuffer ( GLint  used  )  [static]
static void gl2psParseStipplePattern ( GLushort  pattern,
GLint  factor,
int nb,
int  array[10] 
) [static]

Definition at line 2902 of file gl2ps.c.

Referenced by gl2psPrintPGFDash(), gl2psPrintPostScriptDash(), and gl2psPrintSVGDash().

static void gl2psPDFgroupListDelete ( void   )  [static]
static void gl2psPDFgroupListInit ( void   )  [static]
static int gl2psPDFgroupListWriteFontResources ( void   )  [static]
static int gl2psPDFgroupListWriteGStateResources ( void   )  [static]
static void gl2psPDFgroupListWriteMainStream ( void   )  [static]
static int gl2psPDFgroupListWriteObjects ( int  entryoffs  )  [static]
static int gl2psPDFgroupListWriteShaderResources ( void   )  [static]
static int gl2psPDFgroupListWriteVariableResources ( void   )  [static]
static int gl2psPDFgroupListWriteXObjectResources ( void   )  [static]
static void gl2psPDFgroupObjectInit ( GL2PSpdfgroup gro  )  [static]
static void gl2psPDFRectHull ( GLfloat *  xmin,
GLfloat *  xmax,
GLfloat *  ymin,
GLfloat *  ymax,
GL2PStriangle triangles,
int  cnt 
) [static]

Definition at line 4298 of file gl2ps.c.

References GL2PStriangle::vertex, and GL2PSvertex::xyz.

Referenced by gl2psPrintPDFShader().

static void gl2psPDFstacksInit ( void   )  [static]
static const char* gl2psPGFTextAlignment ( int  align  )  [static]
GL2PSDLL_API GLint gl2psPointSize ( GLfloat  value  ) 

Definition at line 6008 of file gl2ps.c.

References GL2PS_POINT_SIZE_TOKEN.

static int gl2psPrintf ( const char fmt,
  ... 
) [static]
static void gl2psPrintGzipFooter ( void   )  [static]
static void gl2psPrintGzipHeader ( void   )  [static]
static void gl2psPrintPDFBeginViewport ( GLint  viewport[4]  )  [static]
static int gl2psPrintPDFCatalog ( void   )  [static]

Definition at line 3960 of file gl2ps.c.

References GL2PScontext::stream.

Referenced by gl2psPrintPDFHeader().

static int gl2psPrintPDFCompressorType ( void   )  [static]
static int gl2psPrintPDFDataStreamLength ( int  val  )  [static]

Definition at line 4091 of file gl2ps.c.

References GL2PScontext::stream.

Referenced by gl2psPrintPDFFooter().

static GLint gl2psPrintPDFEndViewport ( void   )  [static]

Definition at line 4801 of file gl2ps.c.

References gl2psPrintf(), gl2psPrintPrimitives(), and GL2PScontext::streamlength.

static int gl2psPrintPDFFillColor ( GL2PSrgba  rgba  )  [static]
static void gl2psPrintPDFFinalPrimitive ( void   )  [static]

Definition at line 4810 of file gl2ps.c.

static void gl2psPrintPDFFooter ( void   )  [static]
static int gl2psPrintPDFGSObject ( void   )  [static]

Definition at line 4156 of file gl2ps.c.

References GL2PScontext::stream.

Referenced by gl2psPrintPDFFooter().

static void gl2psPrintPDFHeader ( void   )  [static]
static int gl2psPrintPDFInfo ( void   )  [static]
static int gl2psPrintPDFLineWidth ( GLfloat  lw  )  [static]

Definition at line 3392 of file gl2ps.c.

References GL2PS_ZERO, and gl2psPrintf().

Referenced by gl2psPDFgroupListWriteMainStream().

static int gl2psPrintPDFOpenPage ( void   )  [static]
static int gl2psPrintPDFPages ( void   )  [static]

Definition at line 3971 of file gl2ps.c.

References GL2PScontext::stream.

Referenced by gl2psPrintPDFHeader().

static int gl2psPrintPDFPixmap ( int  obj,
int  childobj,
GL2PSimage im,
int  gray 
) [static]
static int gl2psPrintPDFPixmapStreamData ( GL2PSimage im,
int(*)(unsigned long data, int size)  action,
int  gray 
) [static]

Definition at line 4491 of file gl2ps.c.

References GL2PSimage::format, gl2psGetRGB(), GL2PSimage::height, GL2PSimage::width, and x.

Referenced by gl2psPrintPDFPixmap().

static void gl2psPrintPDFPrimitive ( void *  data  )  [static]
static int gl2psPrintPDFShader ( int  obj,
GL2PStriangle triangles,
int  size,
int  gray 
) [static]
static int gl2psPrintPDFShaderExtGS ( int  obj,
int  childobj 
) [static]

Definition at line 4454 of file gl2ps.c.

References GL2PScontext::stream.

Referenced by gl2psPDFgroupListWriteObjects().

static int gl2psPrintPDFShaderMask ( int  obj,
int  childobj 
) [static]

Definition at line 4415 of file gl2ps.c.

References GL2PScontext::stream, and GL2PScontext::viewport.

Referenced by gl2psPDFgroupListWriteObjects().

static int gl2psPrintPDFShaderSimpleExtGS ( int  obj,
GLfloat  alpha 
) [static]

Definition at line 4475 of file gl2ps.c.

References GL2PScontext::stream.

Referenced by gl2psPDFgroupListWriteObjects().

static int gl2psPrintPDFShaderStreamData ( GL2PStriangle triangle,
GLfloat  dx,
GLfloat  dy,
GLfloat  xmin,
GLfloat  ymin,
int(*)(unsigned long data, int size)  action,
int  gray 
) [static]
static int gl2psPrintPDFShaderStreamDataAlpha ( GL2PSvertex vertex,
int(*)(unsigned long data, int size)  action,
int  sigbyte 
) [static]

Definition at line 4246 of file gl2ps.c.

References GL2PSvertex::rgba.

Referenced by gl2psPrintPDFShaderStreamData().

static int gl2psPrintPDFShaderStreamDataCoord ( GL2PSvertex vertex,
int(*)(unsigned long data, int size)  action,
GLfloat  dx,
GLfloat  dy,
GLfloat  xmin,
GLfloat  ymin 
) [static]

Definition at line 4176 of file gl2ps.c.

References GL2PS_ZERO, and GL2PSvertex::xyz.

Referenced by gl2psPrintPDFShaderStreamData().

static int gl2psPrintPDFShaderStreamDataRGB ( GL2PSvertex vertex,
int(*)(unsigned long data, int size)  action 
) [static]

Definition at line 4222 of file gl2ps.c.

References GL2PSvertex::rgba.

Referenced by gl2psPrintPDFShaderStreamData().

static int gl2psPrintPDFStrokeColor ( GL2PSrgba  rgba  )  [static]

Definition at line 3359 of file gl2ps.c.

References GL2PS_ZERO, gl2psPrintf(), and gl2psSetLastColor().

Referenced by gl2psPDFgroupListWriteMainStream().

static int gl2psPrintPDFText ( int  obj,
GL2PSstring s,
int  fontnumber 
) [static]

Definition at line 4597 of file gl2ps.c.

References GL2PSstring::fontname, and GL2PScontext::stream.

Referenced by gl2psPDFgroupListWriteObjects().

static void gl2psPrintPGFBeginViewport ( GLint  viewport[4]  )  [static]
static void gl2psPrintPGFColor ( GL2PSrgba  rgba  )  [static]
static void gl2psPrintPGFDash ( GLushort  pattern,
GLint  factor 
) [static]
static GLint gl2psPrintPGFEndViewport ( void   )  [static]

Definition at line 5464 of file gl2ps.c.

References gl2psPrintPrimitives(), and GL2PScontext::stream.

static void gl2psPrintPGFFinalPrimitive ( void   )  [static]

Definition at line 5472 of file gl2ps.c.

static void gl2psPrintPGFFooter ( void   )  [static]

Definition at line 5419 of file gl2ps.c.

References GL2PScontext::stream.

static void gl2psPrintPGFHeader ( void   )  [static]
static void gl2psPrintPGFPrimitive ( void *  data  )  [static]
static void gl2psPrintPostScriptBeginViewport ( GLint  viewport[4]  )  [static]
static void gl2psPrintPostScriptColor ( GL2PSrgba  rgba  )  [static]
static int gl2psPrintPostScriptDash ( GLushort  pattern,
GLint  factor,
const char str 
) [static]
static GLint gl2psPrintPostScriptEndViewport ( void   )  [static]

Definition at line 3155 of file gl2ps.c.

References gl2psPrintf(), and gl2psPrintPrimitives().

static void gl2psPrintPostScriptFinalPrimitive ( void   )  [static]

Definition at line 3164 of file gl2ps.c.

References gl2psEndPostScriptLine().

static void gl2psPrintPostScriptFooter ( void   )  [static]

Definition at line 3102 of file gl2ps.c.

References gl2psPrintf(), and gl2psPrintGzipFooter().

static void gl2psPrintPostScriptHeader ( void   )  [static]
static void gl2psPrintPostScriptImagemap ( GLfloat  x,
GLfloat  y,
GLsizei  width,
GLsizei  height,
const unsigned char imagemap 
) [static]

Definition at line 2618 of file gl2ps.c.

References gl2psPrintf(), and gl2psWriteByte().

Referenced by gl2psPrintPostScriptPrimitive().

static void gl2psPrintPostScriptPixmap ( GLfloat  x,
GLfloat  y,
GL2PSimage im 
) [static]
static void gl2psPrintPostScriptPrimitive ( void *  data  )  [static]
static GLint gl2psPrintPrimitives ( void   )  [static]
static void gl2psPrintSVGBeginViewport ( GLint  viewport[4]  )  [static]
static void gl2psPrintSVGDash ( GLushort  pattern,
GLint  factor 
) [static]

Definition at line 4978 of file gl2ps.c.

References gl2psParseStipplePattern(), and gl2psPrintf().

Referenced by gl2psPrintSVGPrimitive().

static GLint gl2psPrintSVGEndViewport ( void   )  [static]

Definition at line 5237 of file gl2ps.c.

References gl2psPrintf(), and gl2psPrintPrimitives().

static void gl2psPrintSVGFinalPrimitive ( void   )  [static]

Definition at line 5246 of file gl2ps.c.

References gl2psEndSVGLine().

static void gl2psPrintSVGFooter ( void   )  [static]

Definition at line 5186 of file gl2ps.c.

References gl2psPrintf(), and gl2psPrintGzipFooter().

static void gl2psPrintSVGHeader ( void   )  [static]
static void gl2psPrintSVGPixmap ( GLfloat  x,
GLfloat  y,
GL2PSimage pixmap 
) [static]
static void gl2psPrintSVGPrimitive ( void *  data  )  [static]
static void gl2psPrintSVGSmoothTriangle ( GL2PSxyz  xyz[3],
GL2PSrgba  rgba[3] 
) [static]
static void gl2psPrintTeXBeginViewport ( GLint  viewport[4]  )  [static]

Definition at line 3310 of file gl2ps.c.

References gl2psPrintTeXHeader(), and GL2PScontext::header.

static GLint gl2psPrintTeXEndViewport ( void   )  [static]

Definition at line 3321 of file gl2ps.c.

References gl2psPrintPrimitives().

static void gl2psPrintTeXFinalPrimitive ( void   )  [static]

Definition at line 3326 of file gl2ps.c.

static void gl2psPrintTeXFooter ( void   )  [static]

Definition at line 3304 of file gl2ps.c.

References GL2PS_LANDSCAPE, GL2PScontext::options, and GL2PScontext::stream.

static void gl2psPrintTeXHeader ( void   )  [static]
static void gl2psPrintTeXPrimitive ( void *  data  )  [static]
static GLfloat gl2psPsca ( GLfloat *  a,
GLfloat *  b 
) [static]

Definition at line 1064 of file gl2ps.c.

Referenced by gl2psCutEdge().

static void gl2psPutPDFImage ( GL2PSimage image,
int  cnt,
GLfloat  x,
GLfloat  y 
) [static]
static void gl2psPutPDFText ( GL2PSstring text,
int  cnt,
GLfloat  x,
GLfloat  y 
) [static]
static void gl2psPvec ( GLfloat *  a,
GLfloat *  b,
GLfloat *  c 
) [static]

Definition at line 1069 of file gl2ps.c.

Referenced by gl2psGetNormal().

static void* gl2psRealloc ( void *  ptr,
size_t  size 
) [static]

Definition at line 306 of file gl2ps.c.

References GL2PS_ERROR, and gl2psMsg().

Referenced by gl2psListRealloc(), gl2psPrintPDFFooter(), and gl2psSplitPrimitive2D().

static void gl2psRescaleAndOffset ( void   )  [static]
static void gl2psResetPostScriptColor ( void   )  [static]

Definition at line 2885 of file gl2ps.c.

References GL2PScontext::lastrgba.

Referenced by gl2psPrintPostScriptPrimitive().

static GLboolean gl2psSameColor ( GL2PSrgba  rgba1,
GL2PSrgba  rgba2 
) [static]
static GLboolean gl2psSameColorThreshold ( int  n,
GL2PSrgba  rgba[],
GL2PSrgba  threshold 
) [static]

Definition at line 689 of file gl2ps.c.

Referenced by gl2psPrintSVGSmoothTriangle().

static GLboolean gl2psSamePosition ( GL2PSxyz  p1,
GL2PSxyz  p2 
) [static]
static void gl2psSetLastColor ( GL2PSrgba  rgba  )  [static]
GL2PSDLL_API GLint gl2psSetOptions ( GLint  options  ) 

Definition at line 6043 of file gl2ps.c.

References GL2PScontext::options.

static void gl2psSortOutTrianglePDFgroup ( GL2PSpdfgroup gro  )  [static]
GL2PSDLL_API GLint gl2psSpecial ( GLint  format,
const char str 
)

Definition at line 5834 of file gl2ps.c.

References GL2PS_SPECIAL, and gl2psAddText().

static GLint gl2psSplitPrimitive ( GL2PSprimitive prim,
GL2PSplane  plane,
GL2PSprimitive **  front,
GL2PSprimitive **  back 
) [static]
static void gl2psSplitPrimitive2D ( GL2PSprimitive prim,
GL2PSplane  plane,
GL2PSprimitive **  front,
GL2PSprimitive **  back 
) [static]
static GLboolean gl2psSupportedBlendMode ( GLenum  sfactor,
GLenum  dfactor 
) [static]

Definition at line 915 of file gl2ps.c.

Referenced by gl2psBlendFunc().

static void gl2psSVGGetColorString ( GL2PSrgba  rgba,
char  str[32] 
) [static]
static void gl2psSVGGetCoordsAndColors ( int  n,
GL2PSvertex verts,
GL2PSxyz xyz,
GL2PSrgba rgba 
) [static]

Definition at line 4833 of file gl2ps.c.

References GL2PScontext::viewport, and GL2PSvertex::xyz.

Referenced by gl2psPrintSVGPrimitive().

static GLint gl2psTestSplitPrimitive ( GL2PSprimitive prim,
GL2PSplane  plane 
) [static]
GL2PSDLL_API GLint gl2psText ( const char str,
const char fontname,
GLshort  fontsize 
)

Definition at line 5829 of file gl2ps.c.

References GL2PS_TEXT, GL2PS_TEXT_BL, and gl2psAddText().

GL2PSDLL_API GLint gl2psTextOpt ( const char str,
const char fontname,
GLshort  fontsize,
GLint  alignment,
GLfloat  angle 
)

Definition at line 5823 of file gl2ps.c.

References GL2PS_TEXT, and gl2psAddText().

static void gl2psTraverseBspTree ( GL2PSbsptree tree,
GL2PSxyz  eye,
GLfloat  epsilon,
GLboolean(*)(GLfloat f1, GLfloat f2)  compare,
void(*)(void *data)  action,
int  inverse 
) [static]
static int gl2psTrianglesFirst ( const void *  a,
const void *  b 
) [static]

Definition at line 1398 of file gl2ps.c.

References GL2PSprimitive::type.

Referenced by gl2psBuildBspTree().

static GLboolean gl2psVertsSameColor ( const GL2PSprimitive prim  )  [static]
static int gl2psWriteBigEndian ( unsigned long  data,
int  bytes 
) [static]

Definition at line 325 of file gl2ps.c.

References size(), and GL2PScontext::stream.

Referenced by gl2psPrintPDFPixmap(), and gl2psPrintPDFShader().

static void gl2psWriteByte ( unsigned char  byte  )  [static]

Definition at line 2410 of file gl2ps.c.

References gl2psPrintf().

Referenced by gl2psPrintPostScriptImagemap(), and gl2psPrintPostScriptPixmap().


Variable Documentation

GL2PScontext* gl2ps = NULL [static]

Definition at line 263 of file gl2ps.c.

Initial value:

Definition at line 5498 of file gl2ps.c.

Initial value:
 {
  gl2psPrintPostScriptHeader,
  gl2psPrintPostScriptFooter,
  gl2psPrintPostScriptBeginViewport,
  gl2psPrintPostScriptEndViewport,
  gl2psPrintPostScriptPrimitive,
  gl2psPrintPostScriptFinalPrimitive,
  "eps",
  "Encapsulated Postscript"
}

Definition at line 3183 of file gl2ps.c.

Initial value:
 {
  gl2psPrintPDFHeader,
  gl2psPrintPDFFooter,
  gl2psPrintPDFBeginViewport,
  gl2psPrintPDFEndViewport,
  gl2psPrintPDFPrimitive,
  gl2psPrintPDFFinalPrimitive,
  "pdf",
  "Portable Document Format"
}

Definition at line 4816 of file gl2ps.c.

Initial value:
 {
  gl2psPrintPGFHeader,
  gl2psPrintPGFFooter,
  gl2psPrintPGFBeginViewport,
  gl2psPrintPGFEndViewport,
  gl2psPrintPGFPrimitive,
  gl2psPrintPGFFinalPrimitive,
  "tex",
  "PGF Latex Graphics"
}

Definition at line 5478 of file gl2ps.c.

Initial value:
 {
  gl2psPrintPostScriptHeader,
  gl2psPrintPostScriptFooter,
  gl2psPrintPostScriptBeginViewport,
  gl2psPrintPostScriptEndViewport,
  gl2psPrintPostScriptPrimitive,
  gl2psPrintPostScriptFinalPrimitive,
  "ps",
  "Postscript"
}

Definition at line 3172 of file gl2ps.c.

Initial value:
 {
  gl2psPrintSVGHeader,
  gl2psPrintSVGFooter,
  gl2psPrintSVGBeginViewport,
  gl2psPrintSVGEndViewport,
  gl2psPrintSVGPrimitive,
  gl2psPrintSVGFinalPrimitive,
  "svg",
  "Scalable Vector Graphics"
}

Definition at line 5254 of file gl2ps.c.

Initial value:
 {
  gl2psPrintTeXHeader,
  gl2psPrintTeXFooter,
  gl2psPrintTeXBeginViewport,
  gl2psPrintTeXEndViewport,
  gl2psPrintTeXPrimitive,
  gl2psPrintTeXFinalPrimitive,
  "tex",
  "LaTeX text"
}

Definition at line 3332 of file gl2ps.c.

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines