00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef ROOT_TPostScript
00013 #define ROOT_TPostScript
00014
00015
00016
00017
00018
00019
00020
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;
00035 Float_t fY1v;
00036 Float_t fX2v;
00037 Float_t fY2v;
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;
00057 Float_t fYsize;
00058 Float_t fMaxsize;
00059 Float_t fRed;
00060 Float_t fGreen;
00061 Float_t fBlue;
00062 Float_t fLineScale;
00063 Int_t fLineJoin;
00064 Int_t fSave;
00065 Int_t fNXzone;
00066 Int_t fNYzone;
00067 Int_t fIXzone;
00068 Int_t fIYzone;
00069 Float_t fMarkerSizeCur;
00070 Int_t fCurrentColor;
00071 Int_t fNpages;
00072 Int_t fType;
00073 Int_t fMode;
00074 Int_t fClip;
00075 Bool_t fBoundingBox;
00076 Bool_t fClear;
00077 Bool_t fClipStatus;
00078 Bool_t fRange;
00079 Bool_t fZone;
00080 char fPatterns[32];
00081 Int_t fNbinCT;
00082 Int_t fNbCellW;
00083 Int_t fNbCellLine;
00084 Int_t fMaxLines;
00085 Int_t fLastCellRed;
00086 Int_t fLastCellGreen;
00087 Int_t fLastCellBlue;
00088 Int_t fNBSameColorCell;
00089
00090 static Int_t fgLineJoin;
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)
00146 };
00147
00148 #endif