Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
TTeXDump.h
Go to the documentation of this file.
1 // @(#)root/postscript:$Id$
2 // Author: Olivier Couet
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TTeXDump
13 #define ROOT_TTeXDump
14 
15 
16 #include "TVirtualPS.h"
17 
18 class TPoints;
19 
20 class TTeXDump : public TVirtualPS {
21 
22 protected:
23  Float_t fXsize; ///< Page size along X
24  Float_t fYsize; ///< Page size along Y
25  Int_t fType; ///< Workstation type used to know if the Tex is open
26  Bool_t fBoundingBox; ///< True when the Tex header is printed
27  Bool_t fRange; ///< True when a range has been defined
28  Float_t fCurrentRed; ///< Current Red component
29  Float_t fCurrentGreen; ///< Current Green component
30  Float_t fCurrentBlue; ///< Current Blue component
31  Float_t fCurrentAlpha; ///< Current Alpha value
32  Float_t fLineScale; ///< Line width scale factor
33 
34 
35 public:
36  TTeXDump();
37  TTeXDump(const char *filename, Int_t type=-113);
38  virtual ~TTeXDump();
39 
40  void CellArrayBegin(Int_t W, Int_t H, Double_t x1, Double_t x2, Double_t y1, Double_t y2);
41  void CellArrayFill(Int_t r, Int_t g, Int_t b);
42  void CellArrayEnd();
43  void Close(Option_t *opt="");
44  Int_t CMtoTeX(Double_t u) {return Int_t(0.5 + 72*u/2.54);}
45  void DefineMarkers();
46  void DrawBox(Double_t x1, Double_t y1,Double_t x2, Double_t y2);
47  void DrawFrame(Double_t xl, Double_t yl, Double_t xt, Double_t yt,
48  Int_t mode, Int_t border, Int_t dark, Int_t light);
49  void DrawPolyLine(Int_t n, TPoints *xy);
50  void DrawPolyLineNDC(Int_t n, TPoints *uv);
51  void DrawPolyMarker(Int_t n, Float_t *x, Float_t *y);
52  void DrawPolyMarker(Int_t n, Double_t *x, Double_t *y);
53  void DrawPS(Int_t n, Float_t *xw, Float_t *yw);
54  void DrawPS(Int_t n, Double_t *xw, Double_t *yw);
55  void NewPage();
56  void Off();
57  void On();
58  void Open(const char *filename, Int_t type=-111);
59  void Range(Float_t xrange, Float_t yrange);
60  void SetColor(Int_t color = 1);
61  void SetColor(Float_t r, Float_t g, Float_t b);
62  void SetFillColor( Color_t cindex=1);
63  void SetLineColor( Color_t cindex=1);
64  void SetLineStyle(Style_t linestyle = 1);
65  void SetLineWidth(Width_t linewidth = 1);
66  void SetLineScale(Float_t scale=1) {fLineScale = scale;}
67  void SetMarkerSize( Size_t msize=1);
68  void SetMarkerColor( Color_t cindex=1);
69  void SetTextColor( Color_t cindex=1);
70  void Text(Double_t x, Double_t y, const char *string);
71  void Text(Double_t, Double_t, const wchar_t *){}
72  void TextNDC(Double_t u, Double_t v, const char *string);
73  void TextNDC(Double_t, Double_t, const wchar_t *){}
74  Float_t UtoTeX(Double_t u);
75  Float_t VtoTeX(Double_t v);
76  Float_t XtoTeX(Double_t x);
77  Float_t YtoTeX(Double_t y);
78 
79  ClassDef(TTeXDump, 0); //Tex driver
80 };
81 
82 #endif