Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
TPolyMarker.h
Go to the documentation of this file.
1 // @(#)root/hist:$Id$
2 // Author: Rene Brun 12/12/94
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_TPolyMarker
13 #define ROOT_TPolyMarker
14 
15 
16 //////////////////////////////////////////////////////////////////////////
17 // //
18 // TPolyMarker //
19 // //
20 // An array of points with the same marker. //
21 // //
22 //////////////////////////////////////////////////////////////////////////
23 
24 
25 #include "TObject.h"
26 #include "TAttMarker.h"
27 #include "TString.h"
28 
29 class TCollection;
30 
31 class TPolyMarker : public TObject, public TAttMarker {
32 protected:
33  Int_t fN; //number of points
34  Int_t fLastPoint; //The index of the last filled point
35  Double_t *fX; //[fN] Array of X coordinates
36  Double_t *fY; //[fN] Array of Y coordinates
37  TString fOption; //options
38 
39  TPolyMarker& operator=(const TPolyMarker&);
40 
41 public:
42  TPolyMarker();
43  TPolyMarker(Int_t n, Option_t *option="");
44  TPolyMarker(Int_t n, Float_t *x, Float_t *y, Option_t *option="");
45  TPolyMarker(Int_t n, Double_t *x, Double_t *y, Option_t *option="");
46  TPolyMarker(const TPolyMarker &polymarker);
47  virtual ~TPolyMarker();
48  virtual void Copy(TObject &polymarker) const;
49  virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
50  virtual void Draw(Option_t *option="");
51  virtual void DrawPolyMarker(Int_t n, Double_t *x, Double_t *y, Option_t *option="");
52  virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py);
53  virtual Int_t GetLastPoint() const { return fLastPoint;}
54  virtual Int_t GetN() const {return fN;}
55  Option_t *GetOption() const {return fOption.Data();}
56  Double_t *GetX() const {return fX;}
57  Double_t *GetY() const {return fY;}
58  virtual void ls(Option_t *option="") const;
59  virtual Int_t Merge(TCollection *list);
60  virtual void Paint(Option_t *option="");
61  virtual void PaintPolyMarker(Int_t n, Double_t *x, Double_t *y, Option_t *option="");
62  virtual void Print(Option_t *option="") const;
63  virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
64  virtual Int_t SetNextPoint(Double_t x, Double_t y); // *MENU*
65  virtual void SetPoint(Int_t point, Double_t x, Double_t y); // *MENU*
66  virtual void SetPolyMarker(Int_t n);
67  virtual void SetPolyMarker(Int_t n, Float_t *x, Float_t *y, Option_t *option="");
68  virtual void SetPolyMarker(Int_t n, Double_t *x, Double_t *y, Option_t *option="");
69  virtual Int_t Size() const {return fLastPoint+1;}
70 
71  ClassDef(TPolyMarker,4) //An array of points with the same marker
72 };
73 
74 #endif