TPDF.h

Go to the documentation of this file.
00001 // @(#)root/postscript:$Id: TPDF.h,v 1.0
00002 // Author: Olivier Couet
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 
00012 #ifndef ROOT_TPDF
00013 #define ROOT_TPDF
00014 
00015 
00016 //////////////////////////////////////////////////////////////////////////
00017 //                                                                      //
00018 // TPDF                                                                 //
00019 //                                                                      //
00020 // PDF driver.                                                          //
00021 //                                                                      //
00022 //////////////////////////////////////////////////////////////////////////
00023 
00024 #ifndef ROOT_TVirtualPS
00025 #include "TVirtualPS.h"
00026 #endif
00027 
00028 class TPoints;
00029 
00030 class TPDF : public TVirtualPS {
00031 
00032 protected:
00033    Float_t  fRed;             //Per cent of red
00034    Float_t  fGreen;           //Per cent of green
00035    Float_t  fBlue;            //Per cent of blue
00036    Float_t  fXsize;           //Page size along X
00037    Float_t  fYsize;           //Page size along Y
00038    Int_t    fType;            //Workstation type used to know if the PDF is open
00039    Int_t    fPageFormat;      //Page format (A4, Letter etc ...)
00040    Int_t    fPageOrientation; //Page orientation (Portrait, Landscape)
00041    Int_t    fStartStream;     //
00042    Float_t  fLineScale;       //Line width scale factor
00043    Int_t   *fObjPos;          //Objets position
00044    Int_t    fObjPosSize;      //Real size of fObjPos
00045    Int_t    fNbObj;           //Number of objects
00046    Int_t    fNbPage;          //Number of pages
00047    Bool_t   fPageNotEmpty;    //True if the current page is not empty
00048    Bool_t   fCompress;        //True when fBuffer must be compressed
00049    Bool_t   fRange;           //True when a range has been defined
00050 
00051 public:
00052    TPDF();
00053    TPDF(const char *filename, Int_t type=-111);
00054    virtual ~TPDF();
00055 
00056    void     CellArrayBegin(Int_t W, Int_t H, Double_t x1, Double_t x2, Double_t y1, Double_t y2);
00057    void     CellArrayFill(Int_t r, Int_t g, Int_t b);
00058    void     CellArrayEnd();
00059    void     Close(Option_t *opt="");
00060    Double_t CMtoPDF(Double_t u) {return Int_t(0.5 + 72*u/2.54);}
00061    void     DrawBox(Double_t x1, Double_t y1,Double_t x2, Double_t  y2);
00062    void     DrawFrame(Double_t xl, Double_t yl, Double_t xt, Double_t  yt,
00063                       Int_t mode, Int_t border, Int_t dark, Int_t light);
00064    void     DrawHatch(Float_t dy, Float_t angle, Int_t n, Float_t *x, Float_t *y);
00065    void     DrawHatch(Float_t dy, Float_t angle, Int_t n, Double_t *x, Double_t *y);
00066    void     DrawPolyLine(Int_t n, TPoints *xy);
00067    void     DrawPolyLineNDC(Int_t n, TPoints *uv);
00068    void     DrawPolyMarker(Int_t n, Float_t *x, Float_t *y);
00069    void     DrawPolyMarker(Int_t n, Double_t *x, Double_t *y);
00070    void     DrawPS(Int_t n, Float_t *xw, Float_t *yw);
00071    void     DrawPS(Int_t n, Double_t *xw, Double_t *yw);
00072    void     LineTo(Double_t x, Double_t y);
00073    void     MoveTo(Double_t x, Double_t y);
00074    void     FontEncode();
00075    void     NewObject(Int_t n);
00076    void     NewPage();
00077    void     Off();
00078    void     On();
00079    void     Open(const char *filename, Int_t type=-111);
00080    void     PatternEncode();
00081    void     PrintFast(Int_t nch, const char *string="");
00082    void     PrintStr(const char *string="");
00083    void     Range(Float_t xrange, Float_t yrange);
00084    void     SetColor(Int_t color = 1);
00085    void     SetColor(Float_t r, Float_t g, Float_t b);
00086    void     SetFillColor( Color_t cindex=1);
00087    void     SetFillPatterns(Int_t ipat, Int_t color);
00088    void     SetLineColor( Color_t cindex=1);
00089    void     SetLineScale(Float_t scale=1) {fLineScale = scale;}
00090    void     SetLineStyle(Style_t linestyle = 1);
00091    void     SetLineWidth(Width_t linewidth = 1);
00092    void     SetMarkerColor( Color_t cindex=1);
00093    void     SetTextColor( Color_t cindex=1);
00094    void     Text(Double_t x, Double_t y, const char *string);
00095    void     TextNDC(Double_t u, Double_t v, const char *string);
00096    void     WriteCompressedBuffer();
00097    virtual  void  WriteReal(Float_t r);
00098    Double_t UtoPDF(Double_t u);
00099    Double_t VtoPDF(Double_t v);
00100    Double_t XtoPDF(Double_t x);
00101    Double_t YtoPDF(Double_t y);
00102 
00103    ClassDef(TPDF,0)  //PDF driver
00104 };
00105 
00106 #endif

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