Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:58:21

0001 //
0002 // ********************************************************************
0003 // * License and Disclaimer                                           *
0004 // *                                                                  *
0005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
0006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
0007 // * conditions of the Geant4 Software License,  included in the file *
0008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
0009 // * include a list of copyright holders.                             *
0010 // *                                                                  *
0011 // * Neither the authors of this software system, nor their employing *
0012 // * institutes,nor the agencies providing financial support for this *
0013 // * work  make  any representation or  warranty, express or implied, *
0014 // * regarding  this  software system or assume any liability for its *
0015 // * use.  Please see the license in the file  LICENSE  and URL above *
0016 // * for the full disclaimer and the limitation of liability.         *
0017 // *                                                                  *
0018 // * This  code  implementation is the result of  the  scientific and *
0019 // * technical work of the GEANT4 collaboration.                      *
0020 // * By using,  copying,  modifying or  distributing the software (or *
0021 // * any work based  on the software)  you  agree  to acknowledge its *
0022 // * use  in  resulting  scientific  publications,  and indicate your *
0023 // * acceptance of all terms of the Geant4 Software license.          *
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