TPostScript.h

Go to the documentation of this file.
00001 // @(#)root/postscript:$Id: TPostScript.h 23936 2008-05-20 16:00:26Z couet $
00002 // Author: O.Couet   16/07/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 
00012 #ifndef ROOT_TPostScript
00013 #define ROOT_TPostScript
00014 
00015 
00016 //////////////////////////////////////////////////////////////////////////
00017 //                                                                      //
00018 // TPostScript                                                          //
00019 //                                                                      //
00020 // PostScript driver.                                                   //
00021 //                                                                      //
00022 //////////////////////////////////////////////////////////////////////////
00023 
00024 
00025 #ifndef ROOT_TVirtualPS
00026 #include "TVirtualPS.h"
00027 #endif
00028 
00029 class TPoints;
00030 
00031 class TPostScript : public TVirtualPS {
00032 
00033 protected:
00034    Float_t fX1v;             //X bottom left corner of paper
00035    Float_t fY1v;             //Y bottom left corner of paper
00036    Float_t fX2v;             //X top right corner of paper
00037    Float_t fY2v;             //Y top right corner of paper
00038    Float_t fX1w;             //
00039    Float_t fY1w;             //
00040    Float_t fX2w;             //
00041    Float_t fY2w;             //
00042    Float_t fDXC;             //
00043    Float_t fDYC;             //
00044    Float_t fXC;              //
00045    Float_t fYC;              //
00046    Float_t fFX;              //
00047    Float_t fFY;              //
00048    Float_t fXVP1;            //
00049    Float_t fXVP2;            //
00050    Float_t fYVP1;            //
00051    Float_t fYVP2;            //
00052    Float_t fXVS1;            //
00053    Float_t fXVS2;            //
00054    Float_t fYVS1;            //
00055    Float_t fYVS2;            //
00056    Float_t fXsize;           //Page size along X
00057    Float_t fYsize;           //Page size along Y
00058    Float_t fMaxsize;         //Largest dimension of X and Y
00059    Float_t fRed;             //Per cent of red
00060    Float_t fGreen;           //Per cent of green
00061    Float_t fBlue;            //Per cent of blue
00062    Float_t fLineScale;       //Line width scale factor
00063    Int_t   fLineJoin;        //Appearance of joining lines
00064    Int_t   fSave;            //Number of gsave for restore
00065    Int_t   fNXzone;          //Number of zones along X
00066    Int_t   fNYzone;          //Number of zones along Y
00067    Int_t   fIXzone;          //Current zone along X
00068    Int_t   fIYzone;          //Current zone along Y
00069    Float_t fMarkerSizeCur;   //current transformed value of marker size
00070    Int_t   fCurrentColor;    //current Postscript color index
00071    Int_t   fNpages;          //number of pages
00072    Int_t   fType;            //PostScript workstation type
00073    Int_t   fMode;            //PostScript mode
00074    Int_t   fClip;            //Clipping mode
00075    Bool_t  fBoundingBox;     //True for Encapsulated PostScript
00076    Bool_t  fClear;           //True when page must be cleared
00077    Bool_t  fClipStatus;      //Clipping Indicator
00078    Bool_t  fRange;           //True when a range has been defined
00079    Bool_t  fZone;            //Zone indicator
00080    char    fPatterns[32];    //Indicate if pattern n is defined
00081    Int_t   fNbinCT;          //Number of entries in the current Cell Array
00082    Int_t   fNbCellW;         //Number of boxes per line
00083    Int_t   fNbCellLine;      //Number of boxes in the current line
00084    Int_t   fMaxLines;        //Maximum number of lines in a PS array
00085    Int_t   fLastCellRed;     //Last red value
00086    Int_t   fLastCellGreen;   //Last green value
00087    Int_t   fLastCellBlue;    //Last blue value
00088    Int_t   fNBSameColorCell; //Number of boxes with the same color
00089 
00090    static Int_t fgLineJoin;  //Appearance of joining lines
00091 
00092 public:
00093    TPostScript();
00094    TPostScript(const char *filename, Int_t type=-111);
00095    virtual ~TPostScript();
00096 
00097    void  CellArrayBegin(Int_t W, Int_t H, Double_t x1, Double_t x2,
00098                                           Double_t y1, Double_t y2);
00099    void  CellArrayFill(Int_t r, Int_t g, Int_t b);
00100    void  CellArrayEnd();
00101    void  Close(Option_t *opt="");
00102    Int_t CMtoPS(Double_t u) {return Int_t(0.5 + 72*u/2.54);}
00103    void  DefineMarkers();
00104    void  DrawBox(Double_t x1, Double_t y1,Double_t x2, Double_t  y2);
00105    void  DrawFrame(Double_t xl, Double_t yl, Double_t xt, Double_t  yt,
00106                    Int_t mode, Int_t border, Int_t dark, Int_t light);
00107    void  DrawHatch(Float_t dy, Float_t angle, Int_t n, Float_t *x,
00108                    Float_t *y);
00109    void  DrawHatch(Float_t dy, Float_t angle, Int_t n, Double_t *x,
00110                    Double_t *y);
00111    void  DrawPolyLine(Int_t n, TPoints *xy);
00112    void  DrawPolyLineNDC(Int_t n, TPoints *uv);
00113    void  DrawPolyMarker(Int_t n, Float_t *x, Float_t *y);
00114    void  DrawPolyMarker(Int_t n, Double_t *x, Double_t *y);
00115    void  DrawPS(Int_t n, Float_t *xw, Float_t *yw);
00116    void  DrawPS(Int_t n, Double_t *xw, Double_t *yw);
00117    void  FontEncode();
00118    void  Initialize();
00119    void  NewPage();
00120    void  Off();
00121    void  On();
00122    void  Open(const char *filename, Int_t type=-111);
00123    void  SaveRestore(Int_t flag);
00124    void  SetFillColor( Color_t cindex=1);
00125    void  SetFillPatterns(Int_t ipat, Int_t color);
00126    void  SetLineColor( Color_t cindex=1);
00127    void  SetLineJoin(Int_t linejoin=0);
00128    void  SetLineStyle(Style_t linestyle = 1);
00129    void  SetLineWidth(Width_t linewidth = 1);
00130    void  SetLineScale(Float_t scale=3) {fLineScale = scale;}
00131    void  SetMarkerColor( Color_t cindex=1);
00132    void  SetTextColor( Color_t cindex=1);
00133    void  MovePS(Int_t x, Int_t y);
00134    void  Range(Float_t xrange, Float_t yrange);
00135    void  SetColor(Int_t color = 1);
00136    void  SetColor(Float_t r, Float_t g, Float_t b);
00137    void  Text(Double_t x, Double_t y, const char *string);
00138    void  TextNDC(Double_t u, Double_t v, const char *string);
00139    Int_t UtoPS(Double_t u);
00140    Int_t VtoPS(Double_t v);
00141    Int_t XtoPS(Double_t x);
00142    Int_t YtoPS(Double_t y);
00143    void  Zone();
00144 
00145    ClassDef(TPostScript,0)  //PostScript driver
00146 };
00147 
00148 #endif

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