00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef ROOT_TPolyLine
00013 #define ROOT_TPolyLine
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef ROOT_TString
00026 #include "TString.h"
00027 #endif
00028 #ifndef ROOT_TObject
00029 #include "TObject.h"
00030 #endif
00031 #ifndef ROOT_TAttLine
00032 #include "TAttLine.h"
00033 #endif
00034 #ifndef ROOT_TAttFill
00035 #include "TAttFill.h"
00036 #endif
00037
00038 class TCollection;
00039
00040 class TPolyLine : public TObject, public TAttLine, public TAttFill {
00041
00042 protected:
00043 Int_t fN;
00044 Int_t fLastPoint;
00045 Double_t *fX;
00046 Double_t *fY;
00047 TString fOption;
00048
00049 TPolyLine& operator=(const TPolyLine&);
00050
00051 public:
00052
00053 enum { kPolyLineNDC = BIT(14) };
00054
00055 TPolyLine();
00056 TPolyLine(Int_t n, Option_t *option="");
00057 TPolyLine(Int_t n, Float_t *x, Float_t *y, Option_t *option="");
00058 TPolyLine(Int_t n, Double_t *x, Double_t *y, Option_t *option="");
00059 TPolyLine(const TPolyLine &polyline);
00060 virtual ~TPolyLine();
00061
00062 virtual void Copy(TObject &polyline) const;
00063 virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
00064 virtual void Draw(Option_t *option="");
00065 virtual void DrawPolyLine(Int_t n, Double_t *x, Double_t *y, Option_t *option="");
00066 virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py);
00067 virtual Int_t GetLastPoint() const { return fLastPoint;}
00068 Int_t GetN() const {return fN;}
00069 Double_t *GetX() const {return fX;}
00070 Double_t *GetY() const {return fY;}
00071 Option_t *GetOption() const {return fOption.Data();}
00072 virtual void ls(Option_t *option="") const;
00073 virtual Int_t Merge(TCollection *list);
00074 virtual void Paint(Option_t *option="");
00075 virtual void PaintPolyLine(Int_t n, Double_t *x, Double_t *y, Option_t *option="");
00076 virtual void PaintPolyLineNDC(Int_t n, Double_t *x, Double_t *y, Option_t *option="");
00077 virtual void Print(Option_t *option="") const;
00078 virtual void SavePrimitive(ostream &out, Option_t *option = "");
00079 virtual void SetNDC(Bool_t isNDC=kTRUE);
00080 virtual Int_t SetNextPoint(Double_t x, Double_t y);
00081 virtual void SetOption(Option_t *option="") {fOption = option;}
00082 virtual void SetPoint(Int_t point, Double_t x, Double_t y);
00083 virtual void SetPolyLine(Int_t n);
00084 virtual void SetPolyLine(Int_t n, Float_t *x, Float_t *y, Option_t *option="");
00085 virtual void SetPolyLine(Int_t n, Double_t *x, Double_t *y3, Option_t *option="");
00086 virtual Int_t Size() const {return fLastPoint+1;}
00087
00088 ClassDef(TPolyLine,3)
00089 };
00090
00091 #endif
00092