TVirtualPS.h

Go to the documentation of this file.
00001 // @(#)root/base:$Id: TVirtualPS.h 33327 2010-04-30 14:36:34Z couet $
00002 // Author: Rene Brun   05/09/99
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 #ifndef ROOT_TVirtualPS
00012 #define ROOT_TVirtualPS
00013 
00014 
00015 //////////////////////////////////////////////////////////////////////////
00016 //                                                                      //
00017 // TVirtualPS                                                           //
00018 //                                                                      //
00019 // Abstract interface to a PostScript driver.                           //
00020 //                                                                      //
00021 //////////////////////////////////////////////////////////////////////////
00022 
00023 
00024 #ifndef ROOT_TNamed
00025 #include "TNamed.h"
00026 #endif
00027 #ifndef ROOT_TAttLine
00028 #include "TAttLine.h"
00029 #endif
00030 #ifndef ROOT_TAttFill
00031 #include "TAttFill.h"
00032 #endif
00033 #ifndef ROOT_TAttText
00034 #include "TAttText.h"
00035 #endif
00036 #ifndef ROOT_TAttMarker
00037 #include "TAttMarker.h"
00038 #endif
00039 
00040 class TVirtualPS : public TNamed, public TAttLine, public TAttFill, public TAttMarker, public TAttText {
00041 
00042 private:
00043    TVirtualPS(const TVirtualPS&); // Not implemented
00044    TVirtualPS& operator=(const TVirtualPS&); // Not implemented
00045 
00046 protected:
00047    Int_t        fNByte;           //Number of bytes written in the file (PDF)
00048    Int_t        fLenBuffer;       //Buffer length
00049    Int_t        fSizBuffer;       //Buffer size
00050    Bool_t       fPrinted;         //True when a page must be printed
00051    ofstream    *fStream;          //File stream identifier
00052    char        *fBuffer;          //File buffer
00053    const char  *fImplicitCREsc;   //Escape symbol before enforced new line
00054 
00055 public:
00056    TVirtualPS();
00057    TVirtualPS(const char *filename, Int_t type=-111);
00058    virtual     ~TVirtualPS();
00059    virtual void  CellArrayBegin(Int_t W, Int_t H, Double_t x1, Double_t x2, Double_t y1, Double_t y2) = 0;
00060    virtual void  CellArrayFill(Int_t r, Int_t g, Int_t b) = 0;
00061    virtual void  CellArrayEnd() = 0;
00062    virtual void  Close(Option_t *opt="") = 0;
00063    virtual void  DrawBox(Double_t x1, Double_t y1,Double_t x2, Double_t  y2) = 0;
00064    virtual void  DrawFrame(Double_t xl, Double_t yl, Double_t xt, Double_t  yt,
00065                            Int_t mode, Int_t border, Int_t dark, Int_t light) = 0;
00066    virtual void  DrawPolyMarker(Int_t n, Float_t *x, Float_t *y) = 0;
00067    virtual void  DrawPolyMarker(Int_t n, Double_t *x, Double_t *y) = 0;
00068    virtual void  DrawPS(Int_t n, Float_t *xw, Float_t *yw) = 0;
00069    virtual void  DrawPS(Int_t n, Double_t *xw, Double_t *yw) = 0;
00070    virtual void  NewPage() = 0;
00071    virtual void  Open(const char *filename, Int_t type=-111) = 0;
00072    virtual void  Text(Double_t x, Double_t y, const char *string) = 0;
00073    virtual void  SetColor(Float_t r, Float_t g, Float_t b) = 0;
00074 
00075    virtual void  PrintFast(Int_t nch, const char *string="");
00076    virtual void  PrintStr(const char *string="");
00077    virtual void  WriteInteger(Int_t i, Bool_t space=kTRUE);
00078    virtual void  WriteReal(Float_t r);
00079    virtual void *GetStream() const {  return (void*)fStream; }
00080    virtual void  SetStream(ofstream *os) {  fStream = os; }
00081 
00082    virtual void  SetType(Int_t /*type*/ = -111) { }
00083    virtual Int_t GetType() const { return 111; }
00084 
00085    ClassDef(TVirtualPS,0)  //Abstract interface to a PostScript driver
00086 };
00087 
00088 
00089 R__EXTERN TVirtualPS  *gVirtualPS;
00090 
00091 #endif

Generated on Tue Jul 5 14:10:34 2011 for ROOT_528-00b_version by  doxygen 1.5.1