ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 //////////////////////////////////////////////////////////////////////////
17 // //
18 // TTeXDump //
19 // //
20 // Tex driver. //
21 // //
22 //////////////////////////////////////////////////////////////////////////
23 
24 #ifndef ROOT_TVirtualPS
25 #include "TVirtualPS.h"
26 #endif
27 
28 class TPoints;
29 
30 class TTeXDump : public TVirtualPS {
31 
32 protected:
33  Float_t fXsize; //Page size along X
34  Float_t fYsize; //Page size along Y
35  Int_t fType; //Workstation type used to know if the Tex is open
36  Bool_t fBoundingBox; //True when the Tex header is printed
37  Bool_t fRange; //True when a range has been defined
38  Float_t fCurrentRed; //Current Red component
39  Float_t fCurrentGreen; //Current Green component
40  Float_t fCurrentBlue; //Current Blue component
41  Float_t fCurrentAlpha; //Current Alpha value
42  Float_t fLineScale; //Line width scale factor
43 
44 
45 public:
46  TTeXDump();
47  TTeXDump(const char *filename, Int_t type=-113);
48  virtual ~TTeXDump();
49 
51  void CellArrayFill(Int_t r, Int_t g, Int_t b);
52  void CellArrayEnd();
53  void Close(Option_t *opt="");
54  Int_t CMtoTeX(Double_t u) {return Int_t(0.5 + 72*u/2.54);}
55  void DefineMarkers();
57  void DrawFrame(Double_t xl, Double_t yl, Double_t xt, Double_t yt,
58  Int_t mode, Int_t border, Int_t dark, Int_t light);
59  void DrawPolyLine(Int_t n, TPoints *xy);
60  void DrawPolyLineNDC(Int_t n, TPoints *uv);
63  void DrawPS(Int_t n, Float_t *xw, Float_t *yw);
64  void DrawPS(Int_t n, Double_t *xw, Double_t *yw);
65  void NewPage();
66  void Off();
67  void On();
68  void Open(const char *filename, Int_t type=-111);
69  void Range(Float_t xrange, Float_t yrange);
70  void SetColor(Int_t color = 1);
71  void SetColor(Float_t r, Float_t g, Float_t b);
72  void SetFillColor( Color_t cindex=1);
73  void SetLineColor( Color_t cindex=1);
74  void SetLineStyle(Style_t linestyle = 1);
75  void SetLineWidth(Width_t linewidth = 1);
76  void SetLineScale(Float_t scale=1) {fLineScale = scale;}
77  void SetMarkerSize( Size_t msize=1);
78  void SetMarkerColor( Color_t cindex=1);
79  void SetTextColor( Color_t cindex=1);
80  void Text(Double_t x, Double_t y, const char *string);
81  void Text(Double_t, Double_t, const wchar_t *){}
82  void TextNDC(Double_t u, Double_t v, const char *string);
83  void TextNDC(Double_t, Double_t, const wchar_t *){}
88 
89  ClassDef(TTeXDump,2) //Tex driver
90 };
91 
92 #endif
void CellArrayBegin(Int_t W, Int_t H, Double_t x1, Double_t x2, Double_t y1, Double_t y2)
Begin the Cell Array painting.
Definition: TTeXDump.cxx:828
void Close(Option_t *opt="")
Close a TeX file.
Definition: TTeXDump.cxx:191
void DrawPolyLine(Int_t n, TPoints *xy)
Draw a PolyLine.
Definition: TTeXDump.cxx:347
void SetMarkerSize(Size_t msize=1)
Set size for markers.
Definition: TTeXDump.cxx:656
short Style_t
Definition: RtypesCore.h:76
Float_t fCurrentRed
Definition: TTeXDump.h:38
float Float_t
Definition: RtypesCore.h:53
float Size_t
Definition: RtypesCore.h:83
const char Option_t
Definition: RtypesCore.h:62
void SetLineColor(Color_t cindex=1)
Set color index for lines.
Definition: TTeXDump.cxx:627
void SetLineStyle(Style_t linestyle=1)
Change the line style.
Definition: TTeXDump.cxx:640
Float_t UtoTeX(Double_t u)
Convert U from NDC coordinate to TeX.
Definition: TTeXDump.cxx:792
Float_t fLineScale
Definition: TTeXDump.h:42
void DrawPS(Int_t n, Float_t *xw, Float_t *yw)
Not needed in TeX case.
Definition: TTeXDump.cxx:853
void DefineMarkers()
add additional pgfplotmarks
Definition: TTeXDump.cxx:861
static const char * filename()
#define H(x, y, z)
void Text(Double_t x, Double_t y, const char *string)
Draw text.
Definition: TTeXDump.cxx:721
virtual ~TTeXDump()
Default TeX destructor.
Definition: TTeXDump.cxx:183
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
Float_t fCurrentAlpha
Definition: TTeXDump.h:41
Float_t VtoTeX(Double_t v)
Convert V from NDC coordinate to TeX.
Definition: TTeXDump.cxx:801
Float_t fCurrentBlue
Definition: TTeXDump.h:40
static const double x2[5]
Double_t x[n]
Definition: legend1.C:17
void Text(Double_t, Double_t, const wchar_t *)
Definition: TTeXDump.h:81
Float_t fYsize
Definition: TTeXDump.h:34
ClassDef(TAttLine, 2)
Float_t XtoTeX(Double_t x)
Convert X from world coordinate to TeX.
Definition: TTeXDump.cxx:810
short Color_t
Definition: RtypesCore.h:79
void TextNDC(Double_t, Double_t, const wchar_t *)
Definition: TTeXDump.h:83
void Off()
Deactivate an already open TeX file.
Definition: TTeXDump.cxx:224
Float_t fXsize
Definition: TTeXDump.h:33
void Open(const char *filename, Int_t type=-111)
Open a TeX file.
Definition: TTeXDump.cxx:134
ROOT::R::TRInterface & r
Definition: Object.C:4
Float_t fCurrentGreen
Definition: TTeXDump.h:39
SVector< double, 2 > v
Definition: Dict.h:5
XPoint xy[kMAXMK]
Definition: TGX11.cxx:122
Bool_t fBoundingBox
Definition: TTeXDump.h:36
void SetFillColor(Color_t cindex=1)
Set color index for fill areas.
Definition: TTeXDump.cxx:618
Bool_t fRange
Definition: TTeXDump.h:37
Int_t CMtoTeX(Double_t u)
Definition: TTeXDump.h:54
void NewPage()
Start the TeX page. This function starts the tikzpicture environment.
Definition: TTeXDump.cxx:586
void On()
Activate an already open TeX file.
Definition: TTeXDump.cxx:208
Float_t YtoTeX(Double_t y)
Convert Y from world coordinate to TeX.
Definition: TTeXDump.cxx:819
void SetTextColor(Color_t cindex=1)
Set color index for text.
Definition: TTeXDump.cxx:709
short Width_t
Definition: RtypesCore.h:78
void SetLineScale(Float_t scale=1)
Definition: TTeXDump.h:76
2-D graphics point (world coordinates).
Definition: TPoints.h:29
Interface to TeX.
Definition: TTeXDump.h:30
void Range(Float_t xrange, Float_t yrange)
Set the range for the paper in centimetres.
Definition: TTeXDump.cxx:607
static const double x1[5]
double Double_t
Definition: RtypesCore.h:55
int type
Definition: TGX11.cxx:120
Double_t y[n]
Definition: legend1.C:17
void TextNDC(Double_t u, Double_t v, const char *string)
Write a string of characters in NDC.
Definition: TTeXDump.cxx:782
void SetLineWidth(Width_t linewidth=1)
Set the lines width.
Definition: TTeXDump.cxx:648
void SetColor(Int_t color=1)
Set color with its color index.
Definition: TTeXDump.cxx:672
void CellArrayEnd()
End the Cell Array painting.
Definition: TTeXDump.cxx:845
void CellArrayFill(Int_t r, Int_t g, Int_t b)
Paint the Cell Array.
Definition: TTeXDump.cxx:837
void SetMarkerColor(Color_t cindex=1)
Set color index for markers.
Definition: TTeXDump.cxx:664
void DrawPolyMarker(Int_t n, Float_t *x, Float_t *y)
Paint PolyMarker.
Definition: TTeXDump.cxx:370
void DrawBox(Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Draw a Box.
Definition: TTeXDump.cxx:232
TVirtualPS is an abstract interface to Postscript, PDF, SVG.
Definition: TVirtualPS.h:40
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)
Draw a Frame around a box.
Definition: TTeXDump.cxx:331
const Int_t n
Definition: legend1.C:16
void DrawPolyLineNDC(Int_t n, TPoints *uv)
Draw a PolyLine in NDC space.
Definition: TTeXDump.cxx:362
Int_t fType
Definition: TTeXDump.h:35