// @(#)root/base:$Id$
// Author: Rene Brun   05/09/99

/*************************************************************************
 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/
#ifndef ROOT_TVirtualPS
#define ROOT_TVirtualPS


//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TVirtualPS                                                           //
//                                                                      //
// Abstract interface to a PostScript driver.                           //
//                                                                      //
//////////////////////////////////////////////////////////////////////////


#ifndef ROOT_TNamed
#include "TNamed.h"
#endif
#ifndef ROOT_TAttLine
#include "TAttLine.h"
#endif
#ifndef ROOT_TAttFill
#include "TAttFill.h"
#endif
#ifndef ROOT_TAttText
#include "TAttText.h"
#endif
#ifndef ROOT_TAttMarker
#include "TAttMarker.h"
#endif

class TVirtualPS : public TNamed, public TAttLine, public TAttFill, public TAttMarker, public TAttText {

private:
   TVirtualPS(const TVirtualPS&); // Not implemented
   TVirtualPS& operator=(const TVirtualPS&); // Not implemented

protected:
   Int_t        fNByte;           //Number of bytes written in the file (PDF)
   Int_t        fLenBuffer;       //Buffer length
   Int_t        fSizBuffer;       //Buffer size
   Bool_t       fPrinted;         //True when a page must be printed
   std::ofstream    *fStream;          //File stream identifier
   char        *fBuffer;          //File buffer
   const char  *fImplicitCREsc;   //Escape symbol before enforced new line

public:
   TVirtualPS();
   TVirtualPS(const char *filename, Int_t type=-111);
   virtual     ~TVirtualPS();
   virtual void  CellArrayBegin(Int_t W, Int_t H, Double_t x1, Double_t x2, Double_t y1, Double_t y2) = 0;
   virtual void  CellArrayFill(Int_t r, Int_t g, Int_t b) = 0;
   virtual void  CellArrayEnd() = 0;
   virtual void  Close(Option_t *opt="") = 0;
   virtual void  DrawBox(Double_t x1, Double_t y1,Double_t x2, Double_t  y2) = 0;
   virtual void  DrawFrame(Double_t xl, Double_t yl, Double_t xt, Double_t  yt,
                           Int_t mode, Int_t border, Int_t dark, Int_t light) = 0;
   virtual void  DrawPolyMarker(Int_t n, Float_t *x, Float_t *y) = 0;
   virtual void  DrawPolyMarker(Int_t n, Double_t *x, Double_t *y) = 0;
   virtual void  DrawPS(Int_t n, Float_t *xw, Float_t *yw) = 0;
   virtual void  DrawPS(Int_t n, Double_t *xw, Double_t *yw) = 0;
   virtual void  NewPage() = 0;
   virtual void  Open(const char *filename, Int_t type=-111) = 0;
   virtual void  Text(Double_t x, Double_t y, const char *string) = 0;
   virtual void  Text(Double_t x, Double_t y, const wchar_t *string) = 0;
   virtual void  SetColor(Float_t r, Float_t g, Float_t b) = 0;

   virtual void  PrintFast(Int_t nch, const char *string="");
   virtual void  PrintStr(const char *string="");
   virtual void  WriteInteger(Int_t i, Bool_t space=kTRUE);
   virtual void  WriteReal(Float_t r, Bool_t space=kTRUE);
   virtual void  PrintRaw(Int_t len, const char *str);
   virtual void *GetStream() const {  return (void*)fStream; }
   virtual void  SetStream(std::ofstream *os) {  fStream = os; }

   virtual void  SetType(Int_t /*type*/ = -111) { }
   virtual Int_t GetType() const { return 111; }

   ClassDef(TVirtualPS,0)  //Abstract interface to a PostScript driver
};


R__EXTERN TVirtualPS  *gVirtualPS;

#endif
 TVirtualPS.h:1
 TVirtualPS.h:2
 TVirtualPS.h:3
 TVirtualPS.h:4
 TVirtualPS.h:5
 TVirtualPS.h:6
 TVirtualPS.h:7
 TVirtualPS.h:8
 TVirtualPS.h:9
 TVirtualPS.h:10
 TVirtualPS.h:11
 TVirtualPS.h:12
 TVirtualPS.h:13
 TVirtualPS.h:14
 TVirtualPS.h:15
 TVirtualPS.h:16
 TVirtualPS.h:17
 TVirtualPS.h:18
 TVirtualPS.h:19
 TVirtualPS.h:20
 TVirtualPS.h:21
 TVirtualPS.h:22
 TVirtualPS.h:23
 TVirtualPS.h:24
 TVirtualPS.h:25
 TVirtualPS.h:26
 TVirtualPS.h:27
 TVirtualPS.h:28
 TVirtualPS.h:29
 TVirtualPS.h:30
 TVirtualPS.h:31
 TVirtualPS.h:32
 TVirtualPS.h:33
 TVirtualPS.h:34
 TVirtualPS.h:35
 TVirtualPS.h:36
 TVirtualPS.h:37
 TVirtualPS.h:38
 TVirtualPS.h:39
 TVirtualPS.h:40
 TVirtualPS.h:41
 TVirtualPS.h:42
 TVirtualPS.h:43
 TVirtualPS.h:44
 TVirtualPS.h:45
 TVirtualPS.h:46
 TVirtualPS.h:47
 TVirtualPS.h:48
 TVirtualPS.h:49
 TVirtualPS.h:50
 TVirtualPS.h:51
 TVirtualPS.h:52
 TVirtualPS.h:53
 TVirtualPS.h:54
 TVirtualPS.h:55
 TVirtualPS.h:56
 TVirtualPS.h:57
 TVirtualPS.h:58
 TVirtualPS.h:59
 TVirtualPS.h:60
 TVirtualPS.h:61
 TVirtualPS.h:62
 TVirtualPS.h:63
 TVirtualPS.h:64
 TVirtualPS.h:65
 TVirtualPS.h:66
 TVirtualPS.h:67
 TVirtualPS.h:68
 TVirtualPS.h:69
 TVirtualPS.h:70
 TVirtualPS.h:71
 TVirtualPS.h:72
 TVirtualPS.h:73
 TVirtualPS.h:74
 TVirtualPS.h:75
 TVirtualPS.h:76
 TVirtualPS.h:77
 TVirtualPS.h:78
 TVirtualPS.h:79
 TVirtualPS.h:80
 TVirtualPS.h:81
 TVirtualPS.h:82
 TVirtualPS.h:83
 TVirtualPS.h:84
 TVirtualPS.h:85
 TVirtualPS.h:86
 TVirtualPS.h:87
 TVirtualPS.h:88
 TVirtualPS.h:89
 TVirtualPS.h:90
 TVirtualPS.h:91
 TVirtualPS.h:92
 TVirtualPS.h:93