File indexing completed on 2025-01-18 09:58:21
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028 #ifndef G4gl2ps_h
0029 #define G4gl2ps_h
0030
0031 #include "G4String.hh"
0032
0033 #include <tools/gl2ps_def.h>
0034
0035 class G4gl2ps {
0036
0037 public:
0038 G4gl2ps();
0039 ~G4gl2ps();
0040
0041 void setOpenGLFunctions(tools_gl2ps_gl_funcs_t*);
0042 void setFileName(const char*);
0043 void setExportImageFormat(unsigned int);
0044
0045 void setExportImageFormat_PS() {setExportImageFormat(TOOLS_GL2PS_PS);}
0046 void setExportImageFormat_EPS() {setExportImageFormat(TOOLS_GL2PS_EPS);}
0047 void setExportImageFormat_TEX() {setExportImageFormat(TOOLS_GL2PS_TEX);}
0048 void setExportImageFormat_PDF() {setExportImageFormat(TOOLS_GL2PS_PDF);}
0049 void setExportImageFormat_SVG() {setExportImageFormat(TOOLS_GL2PS_SVG);}
0050 void setExportImageFormat_PGF() {setExportImageFormat(TOOLS_GL2PS_PGF);}
0051
0052 bool enableFileWriting();
0053 void disableFileWriting();
0054 bool fileWritingEnabled() const;
0055
0056 bool beginPage();
0057 bool endPage();
0058
0059 void setLineWidth(int);
0060 void setPointSize(int);
0061 void addTextOpt(const char*,const char*,
0062 tools_GLshort,tools_GLint,tools_GLfloat);
0063 void setViewport(int,int,int,int);
0064 bool extendBufferSize();
0065 void resetBufferSizeParameters();
0066 void setBufferSize(int);
0067
0068 tools_GL2PScontextPointer context() const {return fContext;}
0069 protected:
0070 tools_gl2ps_gl_funcs_t fOpenGLFuncs;
0071 tools_GL2PScontextPointer fContext;
0072 FILE* fFile;
0073 G4String fFileName;
0074 int fViewport[4];
0075 int fBufferSize;
0076 int fBufferSizeLimit;
0077 private:
0078 unsigned int fExportImageFormat;
0079 };
0080
0081 #endif
0082