Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
TGraphPainter.h
Go to the documentation of this file.
1 // @(#)root/histpainter:$Id: TGraphPainter.h,v 1.00
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_TGraphPainter
13 #define ROOT_TGraphPainter
14 
15 
16 //////////////////////////////////////////////////////////////////////////
17 // //
18 // TGraphPainter //
19 // //
20 // helper class to draw graphs //
21 // //
22 //////////////////////////////////////////////////////////////////////////
23 
24 #include "TVirtualGraphPainter.h"
25 
26 class TGraph;
27 class TF1;
28 
29 class TGraphPainter : public TVirtualGraphPainter {
30 
31 public:
32 
33  TGraphPainter();
34 
35  virtual ~TGraphPainter();
36 
37  void ComputeLogs(Int_t npoints, Int_t opt);
38  virtual Int_t DistancetoPrimitiveHelper(TGraph *theGraph, Int_t px, Int_t py);
39  virtual void DrawPanelHelper(TGraph *theGraph);
40  virtual void ExecuteEventHelper(TGraph *theGraph, Int_t event, Int_t px, Int_t py);
41  virtual char *GetObjectInfoHelper(TGraph *theGraph, Int_t px, Int_t py) const;
42  virtual Int_t GetHighlightPoint(TGraph *theGraph) const;
43  virtual void HighlightPoint(TGraph *theGraph, Int_t hpoint, Int_t distance);
44  virtual void PaintHighlightPoint(TGraph *theGraph, Option_t *option);
45  void PaintHelper(TGraph *theGraph, Option_t *option);
46  virtual void PaintGraph(TGraph *theGraph, Int_t npoints, const Double_t *x, const Double_t *y, Option_t *chopt);
47  virtual void PaintGrapHist(TGraph *theGraph, Int_t npoints, const Double_t *x, const Double_t *y, Option_t *chopt);
48  void PaintGraphAsymmErrors(TGraph *theGraph, Option_t *option);
49  void PaintGraphMultiErrors(TGraph *theGraph, Option_t *option);
50  void PaintGraphBentErrors(TGraph *theGraph, Option_t *option);
51  void PaintGraphErrors(TGraph *theGraph, Option_t *option);
52  void PaintGraphPolar(TGraph *theGraph, Option_t *option);
53  void PaintGraphQQ(TGraph *theGraph, Option_t *option);
54  void PaintGraphReverse(TGraph *theGraph, Option_t *option);
55  void PaintGraphSimple(TGraph *theGraph, Option_t *option);
56  void PaintPolyLineHatches(TGraph *theGraph, Int_t n, const Double_t *x, const Double_t *y);
57  void PaintStats(TGraph *theGraph, TF1 *fit);
58  virtual void SetHighlight(TGraph *theGraph);
59  void Smooth(TGraph *theGraph, Int_t npoints, Double_t *x, Double_t *y, Int_t drawtype);
60  static void SetMaxPointsPerLine(Int_t maxp=50);
61 
62 protected:
63 
64  static Int_t fgMaxPointsPerLine; //Number of points per chunks' line when drawing a graph.
65 
66  ClassDef(TGraphPainter,0) // TGraph painter
67 };
68 
69 #endif