Logo ROOT  
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);
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
TVirtualPS
TVirtualPS is an abstract interface to Postscript, PDF, SVG.
Definition: TVirtualPS.h:30
TTeXDump::DrawFrame
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:347
TTeXDump::CellArrayEnd
void CellArrayEnd()
End the Cell Array painting.
Definition: TTeXDump.cxx:897
TTeXDump::VtoTeX
Float_t VtoTeX(Double_t v)
Convert V from NDC coordinate to TeX.
Definition: TTeXDump.cxx:853
n
const Int_t n
Definition: legend1.C:16
TTeXDump::UtoTeX
Float_t UtoTeX(Double_t u)
Convert U from NDC coordinate to TeX.
Definition: TTeXDump.cxx:844
TTeXDump::Text
void Text(Double_t x, Double_t y, const char *string)
Draw text.
Definition: TTeXDump.cxx:768
TTeXDump::CellArrayFill
void CellArrayFill(Int_t r, Int_t g, Int_t b)
Paint the Cell Array.
Definition: TTeXDump.cxx:889
Style_t
short Style_t
Definition: RtypesCore.h:80
H
#define H(x, y, z)
TTeXDump::SetMarkerSize
void SetMarkerSize(Size_t msize=1)
Set size for markers.
Definition: TTeXDump.cxx:699
TTeXDump::DrawPolyMarker
void DrawPolyMarker(Int_t n, Float_t *x, Float_t *y)
Paint PolyMarker.
Definition: TTeXDump.cxx:386
Option_t
const char Option_t
Definition: RtypesCore.h:66
TTeXDump::fType
Int_t fType
Workstation type used to know if the Tex is open.
Definition: TTeXDump.h:25
TTeXDump
Interface to TeX.
Definition: TTeXDump.h:20
r
ROOT::R::TRInterface & r
Definition: Object.C:4
TTeXDump::SetColor
void SetColor(Int_t color=1)
Set color with its color index.
Definition: TTeXDump.cxx:715
TTeXDump::fXsize
Float_t fXsize
Page size along X.
Definition: TTeXDump.h:23
TTeXDump::SetLineWidth
void SetLineWidth(Width_t linewidth=1)
Set the lines width.
Definition: TTeXDump.cxx:691
Float_t
float Float_t
Definition: RtypesCore.h:57
Int_t
int Int_t
Definition: RtypesCore.h:45
TTeXDump::DrawPolyLine
void DrawPolyLine(Int_t n, TPoints *xy)
Draw a PolyLine.
Definition: TTeXDump.cxx:363
TTeXDump::DrawBox
void DrawBox(Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Draw a Box.
Definition: TTeXDump.cxx:229
x
Double_t x[n]
Definition: legend1.C:17
TTeXDump::SetLineStyle
void SetLineStyle(Style_t linestyle=1)
Change the line style.
Definition: TTeXDump.cxx:683
TTeXDump::DrawPS
void DrawPS(Int_t n, Float_t *xw, Float_t *yw)
Not needed in TeX case.
Definition: TTeXDump.cxx:905
TVirtualPS.h
TTeXDump::TextNDC
void TextNDC(Double_t, Double_t, const wchar_t *)
Definition: TTeXDump.h:73
TTeXDump::CMtoTeX
Int_t CMtoTeX(Double_t u)
Definition: TTeXDump.h:44
TTeXDump::DefineMarkers
void DefineMarkers()
add additional pgfplotmarks
Definition: TTeXDump.cxx:913
TTeXDump::SetTextColor
void SetTextColor(Color_t cindex=1)
Set color index for text.
Definition: TTeXDump.cxx:756
TTeXDump::Text
void Text(Double_t, Double_t, const wchar_t *)
Definition: TTeXDump.h:71
Color_t
short Color_t
Definition: RtypesCore.h:83
v
@ v
Definition: rootcling_impl.cxx:3635
b
#define b(i)
Definition: RSha256.hxx:100
bool
x1
static const double x1[5]
Definition: RooGaussKronrodIntegrator1D.cxx:346
xy
XPoint xy[kMAXMK]
Definition: TGX11.cxx:123
TTeXDump::fRange
Bool_t fRange
True when a range has been defined.
Definition: TTeXDump.h:27
TTeXDump::SetFillColor
void SetFillColor(Color_t cindex=1)
Set color index for fill areas.
Definition: TTeXDump.cxx:661
TTeXDump::SetLineColor
void SetLineColor(Color_t cindex=1)
Set color index for lines.
Definition: TTeXDump.cxx:670
TTeXDump::fLineScale
Float_t fLineScale
Line width scale factor.
Definition: TTeXDump.h:32
TTeXDump::CellArrayBegin
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:880
TTeXDump::fCurrentRed
Float_t fCurrentRed
Current Red component.
Definition: TTeXDump.h:28
TTeXDump::SetMarkerColor
void SetMarkerColor(Color_t cindex=1)
Set color index for markers.
Definition: TTeXDump.cxx:707
TTeXDump::Open
void Open(const char *filename, Int_t type=-111)
Open a TeX file.
Definition: TTeXDump.cxx:131
Width_t
short Width_t
Definition: RtypesCore.h:82
TTeXDump::SetLineScale
void SetLineScale(Float_t scale=1)
Definition: TTeXDump.h:66
TTeXDump::DrawPolyLineNDC
void DrawPolyLineNDC(Int_t n, TPoints *uv)
Draw a PolyLine in NDC space.
Definition: TTeXDump.cxx:378
TTeXDump::fYsize
Float_t fYsize
Page size along Y.
Definition: TTeXDump.h:24
TTeXDump::fCurrentAlpha
Float_t fCurrentAlpha
Current Alpha value.
Definition: TTeXDump.h:31
TTeXDump::TTeXDump
TTeXDump()
Default TeX constructor.
Definition: TTeXDump.cxx:85
y
Double_t y[n]
Definition: legend1.C:17
TTeXDump::fCurrentGreen
Float_t fCurrentGreen
Current Green component.
Definition: TTeXDump.h:29
TTeXDump::fBoundingBox
Bool_t fBoundingBox
True when the Tex header is printed.
Definition: TTeXDump.h:26
TTeXDump::Off
void Off()
Deactivate an already open TeX file.
Definition: TTeXDump.cxx:221
TTeXDump::Range
void Range(Float_t xrange, Float_t yrange)
Set the range for the paper in centimetres.
Definition: TTeXDump.cxx:650
TTeXDump::~TTeXDump
virtual ~TTeXDump()
Default TeX destructor.
Definition: TTeXDump.cxx:180
TTeXDump::NewPage
void NewPage()
Start the TeX page. This function starts the tikzpicture environment.
Definition: TTeXDump.cxx:629
Double_t
double Double_t
Definition: RtypesCore.h:59
TTeXDump::On
void On()
Activate an already open TeX file.
Definition: TTeXDump.cxx:205
TTeXDump::fCurrentBlue
Float_t fCurrentBlue
Current Blue component.
Definition: TTeXDump.h:30
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
TTeXDump::XtoTeX
Float_t XtoTeX(Double_t x)
Convert X from world coordinate to TeX.
Definition: TTeXDump.cxx:862
x2
static const double x2[5]
Definition: RooGaussKronrodIntegrator1D.cxx:364
TTeXDump::TextNDC
void TextNDC(Double_t u, Double_t v, const char *string)
Write a string of characters in NDC.
Definition: TTeXDump.cxx:834
TTeXDump::Close
void Close(Option_t *opt="")
Close a TeX file.
Definition: TTeXDump.cxx:188
type
int type
Definition: TGX11.cxx:121
TTeXDump::YtoTeX
Float_t YtoTeX(Double_t y)
Convert Y from world coordinate to TeX.
Definition: TTeXDump.cxx:871
int
Size_t
float Size_t
Definition: RtypesCore.h:87
TPoints
2-D graphics point (world coordinates).
Definition: TPoints.h:19
g
#define g(i)
Definition: RSha256.hxx:105