Logo ROOT   6.12/07
Reference Guide
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 
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();
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);
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 *){}
78 
79  ClassDef(TTeXDump, 0); //Tex driver
80 };
81 
82 #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:868
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:366
void SetMarkerSize(Size_t msize=1)
Set size for markers.
Definition: TTeXDump.cxx:692
short Style_t
Definition: RtypesCore.h:76
Float_t fCurrentRed
Current Red component.
Definition: TTeXDump.h:28
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:663
void SetLineStyle(Style_t linestyle=1)
Change the line style.
Definition: TTeXDump.cxx:676
Float_t UtoTeX(Double_t u)
Convert U from NDC coordinate to TeX.
Definition: TTeXDump.cxx:832
Float_t fLineScale
Line width scale factor.
Definition: TTeXDump.h:32
void DrawPS(Int_t n, Float_t *xw, Float_t *yw)
Not needed in TeX case.
Definition: TTeXDump.cxx:893
void DefineMarkers()
add additional pgfplotmarks
Definition: TTeXDump.cxx:901
#define H(x, y, z)
void Text(Double_t x, Double_t y, const char *string)
Draw text.
Definition: TTeXDump.cxx:761
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
Current Alpha value.
Definition: TTeXDump.h:31
Float_t VtoTeX(Double_t v)
Convert V from NDC coordinate to TeX.
Definition: TTeXDump.cxx:841
Float_t fCurrentBlue
Current Blue component.
Definition: TTeXDump.h:30
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:71
#define ClassDef(name, id)
Definition: Rtypes.h:320
Float_t fYsize
Page size along Y.
Definition: TTeXDump.h:24
Float_t XtoTeX(Double_t x)
Convert X from world coordinate to TeX.
Definition: TTeXDump.cxx:850
short Color_t
Definition: RtypesCore.h:79
void TextNDC(Double_t, Double_t, const wchar_t *)
Definition: TTeXDump.h:73
void Off()
Deactivate an already open TeX file.
Definition: TTeXDump.cxx:224
TTeXDump()
Default TeX constructor.
Definition: TTeXDump.cxx:88
Float_t fXsize
Page size along X.
Definition: TTeXDump.h:23
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
Current Green component.
Definition: TTeXDump.h:29
SVector< double, 2 > v
Definition: Dict.h:5
XPoint xy[kMAXMK]
Definition: TGX11.cxx:122
Bool_t fBoundingBox
True when the Tex header is printed.
Definition: TTeXDump.h:26
void SetFillColor(Color_t cindex=1)
Set color index for fill areas.
Definition: TTeXDump.cxx:654
Bool_t fRange
True when a range has been defined.
Definition: TTeXDump.h:27
Int_t CMtoTeX(Double_t u)
Definition: TTeXDump.h:44
void NewPage()
Start the TeX page. This function starts the tikzpicture environment.
Definition: TTeXDump.cxx:622
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:859
void SetTextColor(Color_t cindex=1)
Set color index for text.
Definition: TTeXDump.cxx:749
short Width_t
Definition: RtypesCore.h:78
void SetLineScale(Float_t scale=1)
Definition: TTeXDump.h:66
2-D graphics point (world coordinates).
Definition: TPoints.h:19
Interface to TeX.
Definition: TTeXDump.h:20
void Range(Float_t xrange, Float_t yrange)
Set the range for the paper in centimetres.
Definition: TTeXDump.cxx:643
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:822
void SetLineWidth(Width_t linewidth=1)
Set the lines width.
Definition: TTeXDump.cxx:684
void SetColor(Int_t color=1)
Set color with its color index.
Definition: TTeXDump.cxx:708
void CellArrayEnd()
End the Cell Array painting.
Definition: TTeXDump.cxx:885
void CellArrayFill(Int_t r, Int_t g, Int_t b)
Paint the Cell Array.
Definition: TTeXDump.cxx:877
void SetMarkerColor(Color_t cindex=1)
Set color index for markers.
Definition: TTeXDump.cxx:700
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
Definition: TRolke.cxx:630
void DrawPolyMarker(Int_t n, Float_t *x, Float_t *y)
Paint PolyMarker.
Definition: TTeXDump.cxx:389
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:30
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:350
const Int_t n
Definition: legend1.C:16
void DrawPolyLineNDC(Int_t n, TPoints *uv)
Draw a PolyLine in NDC space.
Definition: TTeXDump.cxx:381
static constexpr double g
Int_t fType
Workstation type used to know if the Tex is open.
Definition: TTeXDump.h:25