00001
00002
00003
00004
00005
00006
00007
00008 #ifndef BESPOLYGON2D_H
00009 #define BESPOLYGON2D_H
00010
00011 #ifndef ROOT_TNamed
00012 #include <TNamed.h>
00013 #endif
00014 #ifndef ROOT_TAttLine
00015 #include <TAttLine.h>
00016 #endif
00017 #ifndef ROOT_TAttFill
00018 #include <TAttFill.h>
00019 #endif
00020
00021 class TPad;
00022 class TString;
00023 class TView;
00024 class TGeometry;
00025 class TPaveText;
00026
00027 class BesPolygon2D : public TNamed, public TAttLine, public TAttFill {
00028
00029 static int num;
00030 protected:
00031 Double_t *f_xx;
00032 Double_t *f_yy;
00033 Int_t fN;
00034 Double_t *fP;
00035 Double_t *fPBackUp;
00036 Double_t fCenter [3];
00037 Bool_t fRotatable;
00038
00039 TPaveText *fInfoBox;
00040
00041 public:
00042 BesPolygon2D();
00043 BesPolygon2D(const char* name, const char* title, Int_t N, Double_t *P);
00044 virtual ~BesPolygon2D();
00045
00046 virtual void Draw(Option_t *option = "");
00047 virtual void Paint(Option_t *option = "");
00048 virtual char *GetObjectInfo(Int_t px, Int_t py) const;
00049
00050 virtual void SetZRSign(Int_t sign);
00051 virtual void Resize(Double_t ScaleFactor);
00052 virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
00053 virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py);
00054 virtual void SetInfoBox();
00055 virtual void GetCenter(Double_t *Center) const;
00056 virtual void RotatePhi(Double_t phi);
00057 virtual void Restore();
00058 virtual void SetSize(Double_t size);
00059
00060 inline Bool_t IsRotatable() {
00061 return fRotatable;
00062 }
00063 inline void SetRotatable(Bool_t input) {
00064 fRotatable = input;
00065 }
00066 inline void SetName(const char* name) {
00067 TNamed::SetName(name);
00068 }
00069 inline void SetTitle(const char* name) {
00070 TNamed::SetTitle(name);
00071 }
00072 inline void Delete(Option_t *option) {
00073 TObject::Delete(option);
00074 }
00075 inline void DrawClass() {
00076 TObject::DrawClass();
00077 }
00078 inline void DrawClone(Option_t *option) {
00079 TObject::DrawClone(option);
00080 }
00081 inline void SetDrawOption(Option_t *option) {
00082 TObject::SetDrawOption(option);
00083 }
00084 inline void SetPoints(Double_t *P) {
00085 for ( Int_t i = 0; i < fN*3; i++ ) fP[i] = P[i];
00086 }
00087
00088 ClassDef(BesPolygon2D,2)
00089 };
00090
00091 #endif