Geant4-11
|
#include <stdio.h>
#include <stdlib.h>
#include <GL/gl.h>
Go to the source code of this file.
Data Structures | |
struct | GL2PSvertex |
Typedefs | |
typedef GLfloat | GL2PSrgba[4] |
typedef GLfloat | GL2PSxyz[3] |
Functions | |
GL2PSDLL_API void | gl2psAddPolyPrimitive (GLshort type, GLshort numverts, GL2PSvertex *verts, GLint offset, GLfloat ofactor, GLfloat ounits, GLushort pattern, GLint factor, GLfloat width, GLint linecap, GLint linejoin, char boundary) |
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) |
GL2PSDLL_API GLint | gl2psDisable (GLint mode) |
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) |
GL2PSDLL_API GLint | gl2psEndViewport (void) |
GL2PSDLL_API GLint | gl2psForceRasterPos (GL2PSvertex *vert) |
GL2PSDLL_API const char * | gl2psGetFileExtension (GLint format) |
GL2PSDLL_API GLint | gl2psGetFileFormat () |
GL2PSDLL_API const char * | gl2psGetFormatDescription (GLint format) |
GL2PSDLL_API GLint | gl2psGetOptions (GLint *options) |
GL2PSDLL_API GLint | gl2psLineCap (GLint value) |
GL2PSDLL_API GLint | gl2psLineJoin (GLint value) |
GL2PSDLL_API GLint | gl2psLineWidth (GLfloat value) |
GL2PSDLL_API GLint | gl2psPointSize (GLfloat value) |
GL2PSDLL_API GLint | gl2psSetOptions (GLint options) |
GL2PSDLL_API GLint | gl2psSetTexScaling (GLfloat scaling) |
GL2PSDLL_API GLint | gl2psSorting (GLint mode) |
GL2PSDLL_API GLint | gl2psSpecial (GLint format, const char *str) |
GL2PSDLL_API GLint | gl2psSpecialColor (GLint format, const char *str, GL2PSrgba rgba) |
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 align, GLfloat angle) |
GL2PSDLL_API GLint | gl2psTextOptColor (const char *str, const char *fontname, GLshort fontsize, GLint align, GLfloat angle, GL2PSrgba color) |
GL2PSDLL_API GLint | gl2psTextOptColorBL (const char *str, const char *fontname, GLshort fontsize, GLint align, GLfloat angle, GL2PSrgba color, GLfloat blx, GLfloat bly) |
#define GL2PS_VERSION |
GL2PSDLL_API void gl2psAddPolyPrimitive | ( | GLshort | type, |
GLshort | numverts, | ||
GL2PSvertex * | verts, | ||
GLint | offset, | ||
GLfloat | ofactor, | ||
GLfloat | ounits, | ||
GLushort | pattern, | ||
GLint | factor, | ||
GLfloat | width, | ||
GLint | linecap, | ||
GLint | linejoin, | ||
char | boundary | ||
) |
Definition at line 2263 of file gl2ps.cc.
References GL2PSprimitive::boundary, GL2PSprimitive::culled, GL2PSprimitive::factor, gl2ps, gl2psListAdd(), gl2psMalloc(), GL2PSprimitive::linecap, GL2PSprimitive::linejoin, GL2PSprimitive::numverts, GL2PSprimitive::ofactor, GL2PSprimitive::offset, GL2PSprimitive::ounits, GL2PSprimitive::pattern, GL2PScontext::primitives, GL2PSprimitive::type, GL2PSprimitive::verts, and GL2PSprimitive::width.
Referenced by gl2psParseFeedbackBuffer().
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 | ||
) |
Definition at line 6002 of file gl2ps.cc.
References GL2PScontext::auxprimitives, GL2PScontext::bgcolor, GL2PScontext::blendfunc, GL2PScontext::blending, GL2PScontext::buffersize, GL2PScontext::colormap, GL2PScontext::colormode, GL2PScontext::colorsize, GL2PScontext::compress, GL2PScontext::feedback, GL2PScontext::filename, GL2PScontext::forcerasterpos, GL2PScontext::format, gl2ps, GL2PS_BSP_SORT, GL2PS_ERROR, GL2PS_NO_BLENDING, GL2PS_NO_OPENGL_CONTEXT, GL2PS_NO_SORT, GL2PS_NONE, GL2PS_SIMPLE_SORT, GL2PS_SUCCESS, GL2PS_SVG, GL2PS_USE_CURRENT_VIEWPORT, gl2psbackends, gl2psCheckOptions(), gl2psFree(), gl2psListCreate(), gl2psMalloc(), gl2psMsg(), GL2PScontext::header, GL2PScontext::imagemap_head, GL2PScontext::imagemap_tail, GL2PScontext::imagetree, GL2PScontext::lastfactor, GL2PScontext::lastlinecap, GL2PScontext::lastlinejoin, GL2PScontext::lastlinewidth, GL2PScontext::lastpattern, GL2PScontext::lastrgba, GL2PScontext::lastvertex, GL2PScontext::maxbestroot, GL2PScontext::options, GL2PScontext::pdfgrouplist, GL2PScontext::pdfprimlist, GL2PScontext::primitives, GL2PScontext::primitivetoadd, GL2PScontext::producer, GL2PSvertex::rgba, GL2PScontext::sort, GL2PScontext::stream, GL2PScontext::tex_scaling, GL2PScontext::threshold, GL2PScontext::title, GL2PScontext::viewport, GL2PScontext::xreflist, GL2PSvertex::xyz, and GL2PScontext::zerosurfacearea.
GL2PSDLL_API GLint gl2psBeginViewport | ( | GLint | viewport[4] | ) |
Definition at line 6223 of file gl2ps.cc.
References GL2PSbackend::beginViewport, GL2PScontext::format, gl2ps, GL2PS_SUCCESS, GL2PS_UNINITIALIZED, and gl2psbackends.
GL2PSDLL_API GLint gl2psBlendFunc | ( | GLenum | sfactor, |
GLenum | dfactor | ||
) |
Definition at line 6552 of file gl2ps.cc.
References gl2ps, GL2PS_DST_BLEND_TOKEN, GL2PS_SRC_BLEND_TOKEN, GL2PS_SUCCESS, GL2PS_UNINITIALIZED, GL2PS_WARNING, and gl2psSupportedBlendMode().
GL2PSDLL_API GLint gl2psDisable | ( | GLint | mode | ) |
Definition at line 6487 of file gl2ps.cc.
References gl2ps, GL2PS_BLEND, GL2PS_END_BLEND_TOKEN, GL2PS_END_BOUNDARY_TOKEN, GL2PS_END_OFFSET_TOKEN, GL2PS_END_STIPPLE_TOKEN, GL2PS_LINE_STIPPLE, GL2PS_POLYGON_BOUNDARY, GL2PS_POLYGON_OFFSET_FILL, GL2PS_SUCCESS, GL2PS_UNINITIALIZED, GL2PS_WARNING, and gl2psMsg().
GL2PSDLL_API GLint gl2psDrawImageMap | ( | GLsizei | width, |
GLsizei | height, | ||
const GLfloat | position[3], | ||
const unsigned char * | imagemap | ||
) |
Definition at line 6426 of file gl2ps.cc.
References gl2ps, GL2PS_ERROR, GL2PS_IMAGEMAP_TOKEN, GL2PS_SUCCESS, and GL2PS_UNINITIALIZED.
GL2PSDLL_API GLint gl2psDrawPixels | ( | GLsizei | width, |
GLsizei | height, | ||
GLint | xorig, | ||
GLint | yorig, | ||
GLenum | format, | ||
GLenum | type, | ||
const void * | pixels | ||
) |
Definition at line 6312 of file gl2ps.cc.
References GL2PScontext::auxprimitives, GL2PScontext::blending, GL2PSprimitive::boundary, GL2PSprimitive::culled, GL2PSprimitive::data, GL2PSprimitive::factor, GL2PScontext::forcerasterpos, GL2PSimage::format, gl2ps, GL2PS_DRAW_PIXELS_TOKEN, GL2PS_ERROR, GL2PS_NO_BLENDING, GL2PS_NO_OPENGL_CONTEXT, GL2PS_NO_PIXMAP, GL2PS_NONE, GL2PS_PIXMAP, GL2PS_SUCCESS, GL2PS_UNINITIALIZED, gl2psListAdd(), gl2psMalloc(), gl2psMsg(), GL2PSimage::height, GL2PSprimitive::image, GL2PSprimitive::numverts, GL2PSprimitive::ofactor, GL2PSprimitive::offset, GL2PScontext::options, GL2PSprimitive::ounits, GL2PSprimitive::pattern, GL2PSimage::pixels, pos, GL2PScontext::primitives, GL2PScontext::rasterpos, GL2PSvertex::rgba, GL2PSimage::type, GL2PSprimitive::type, GL2PSprimitive::verts, GL2PSimage::width, GL2PSprimitive::width, GL2PSvertex::xyz, GL2PSimage::zoom_x, and GL2PSimage::zoom_y.
GL2PSDLL_API GLint gl2psEnable | ( | GLint | mode | ) |
Definition at line 6451 of file gl2ps.cc.
References gl2ps, GL2PS_BEGIN_BLEND_TOKEN, GL2PS_BEGIN_BOUNDARY_TOKEN, GL2PS_BEGIN_OFFSET_TOKEN, GL2PS_BEGIN_STIPPLE_TOKEN, GL2PS_BLEND, GL2PS_LINE_STIPPLE, GL2PS_POLYGON_BOUNDARY, GL2PS_POLYGON_OFFSET_FILL, GL2PS_SUCCESS, GL2PS_UNINITIALIZED, GL2PS_WARNING, and gl2psMsg().
GL2PSDLL_API GLint gl2psEndPage | ( | void | ) |
Definition at line 6196 of file gl2ps.cc.
References GL2PScontext::auxprimitives, GL2PScontext::colormap, GL2PScontext::feedback, GL2PScontext::filename, GL2PScontext::format, gl2ps, GL2PS_OVERFLOW, GL2PS_UNINITIALIZED, gl2psbackends, gl2psFree(), gl2psFreeImagemap(), gl2psListDelete(), gl2psPrintPrimitives(), GL2PScontext::imagemap_head, GL2PScontext::primitives, GL2PSbackend::printFooter, GL2PScontext::producer, GL2PScontext::stream, and GL2PScontext::title.
GL2PSDLL_API GLint gl2psEndViewport | ( | void | ) |
Definition at line 6232 of file gl2ps.cc.
References GL2PSbackend::endViewport, GL2PScontext::format, gl2ps, GL2PS_UNINITIALIZED, gl2psbackends, and gl2psResetLineProperties().
GL2PSDLL_API GLint gl2psForceRasterPos | ( | GL2PSvertex * | vert | ) |
Definition at line 6617 of file gl2ps.cc.
References GL2PScontext::forcerasterpos, gl2ps, GL2PS_SUCCESS, GL2PS_UNINITIALIZED, GL2PScontext::rasterpos, GL2PSvertex::rgba, and GL2PSvertex::xyz.
GL2PSDLL_API const char * gl2psGetFileExtension | ( | GLint | format | ) |
Definition at line 6592 of file gl2ps.cc.
References GL2PSbackend::file_extension, and gl2psbackends.
GL2PSDLL_API GLint gl2psGetFileFormat | ( | ) |
Definition at line 6608 of file gl2ps.cc.
References GL2PScontext::format, gl2ps, and GL2PS_UNINITIALIZED.
GL2PSDLL_API const char * gl2psGetFormatDescription | ( | GLint | format | ) |
Definition at line 6600 of file gl2ps.cc.
References GL2PSbackend::description, and gl2psbackends.
GL2PSDLL_API GLint gl2psGetOptions | ( | GLint * | options | ) |
Definition at line 6580 of file gl2ps.cc.
References gl2ps, GL2PS_SUCCESS, GL2PS_UNINITIALIZED, and GL2PScontext::options.
GL2PSDLL_API GLint gl2psLineCap | ( | GLint | value | ) |
Definition at line 6522 of file gl2ps.cc.
References gl2ps, GL2PS_LINE_CAP_TOKEN, GL2PS_SUCCESS, and GL2PS_UNINITIALIZED.
GL2PSDLL_API GLint gl2psLineJoin | ( | GLint | value | ) |
Definition at line 6532 of file gl2ps.cc.
References gl2ps, GL2PS_LINE_JOIN_TOKEN, GL2PS_SUCCESS, and GL2PS_UNINITIALIZED.
GL2PSDLL_API GLint gl2psLineWidth | ( | GLfloat | value | ) |
Definition at line 6542 of file gl2ps.cc.
References gl2ps, GL2PS_LINE_WIDTH_TOKEN, GL2PS_SUCCESS, and GL2PS_UNINITIALIZED.
GL2PSDLL_API GLint gl2psPointSize | ( | GLfloat | value | ) |
Definition at line 6512 of file gl2ps.cc.
References gl2ps, GL2PS_POINT_SIZE_TOKEN, GL2PS_SUCCESS, and GL2PS_UNINITIALIZED.
GL2PSDLL_API GLint gl2psSetOptions | ( | GLint | options | ) |
Definition at line 6567 of file gl2ps.cc.
References GL2PScontext::colormode, gl2ps, GL2PS_ERROR, GL2PS_SUCCESS, GL2PS_UNINITIALIZED, gl2psCheckOptions(), and GL2PScontext::options.
GL2PSDLL_API GLint gl2psSetTexScaling | ( | GLfloat | scaling | ) |
Definition at line 6636 of file gl2ps.cc.
References gl2ps, GL2PS_SUCCESS, GL2PS_UNINITIALIZED, and GL2PScontext::tex_scaling.
GL2PSDLL_API GLint gl2psSorting | ( | GLint | mode | ) |
Definition at line 6246 of file gl2ps.cc.
References gl2ps, GL2PS_BSP_SORT, GL2PS_ERROR, GL2PS_NO_SORT, GL2PS_SIMPLE_SORT, GL2PS_SUCCESS, GL2PS_UNINITIALIZED, gl2psFree(), gl2psMsg(), and GL2PScontext::sort.
GL2PSDLL_API GLint gl2psSpecial | ( | GLint | format, |
const char * | str | ||
) |
Definition at line 6302 of file gl2ps.cc.
References GL2PS_SPECIAL, and gl2psAddText().
GL2PSDLL_API GLint gl2psSpecialColor | ( | GLint | format, |
const char * | str, | ||
GL2PSrgba | rgba | ||
) |
GL2PSDLL_API GLint gl2psText | ( | const char * | str, |
const char * | fontname, | ||
GLshort | fontsize | ||
) |
Definition at line 6296 of file gl2ps.cc.
References GL2PS_TEXT, GL2PS_TEXT_BL, and gl2psAddText().
GL2PSDLL_API GLint gl2psTextOpt | ( | const char * | str, |
const char * | fontname, | ||
GLshort | fontsize, | ||
GLint | align, | ||
GLfloat | angle | ||
) |
Definition at line 6290 of file gl2ps.cc.
References angle, GL2PS_TEXT, and gl2psAddText().
GL2PSDLL_API GLint gl2psTextOptColor | ( | const char * | str, |
const char * | fontname, | ||
GLshort | fontsize, | ||
GLint | align, | ||
GLfloat | angle, | ||
GL2PSrgba | color | ||
) |
Definition at line 6269 of file gl2ps.cc.
References angle, GL2PS_TEXT, and gl2psAddText().
GL2PSDLL_API GLint gl2psTextOptColorBL | ( | const char * | str, |
const char * | fontname, | ||
GLshort | fontsize, | ||
GLint | alignment, | ||
GLfloat | angle, | ||
GL2PSrgba | color, | ||
GLfloat | blx, | ||
GLfloat | bly | ||
) |
This version of gl2psTextOptColor is used to go around the fact that PDF does not support text alignment. The extra parameters (blx, bly) represent the bottom left corner of the text bounding box.
Definition at line 6282 of file gl2ps.cc.
References angle, GL2PS_TEXT, and gl2psAddText().