#ifndef ROOT_TLine #define ROOT_TLine //+SEQ,CopyRight,T=NOINCLUDE. ////////////////////////////////////////////////////////////////////////// // // // TLine // // // // A line segment. // // // ////////////////////////////////////////////////////////////////////////// #ifndef ROOT_TObject //*KEEP,TObject. #include "TObject.h" //*KEND. #endif #ifndef ROOT_TAttLine //*KEEP,TAttLine. #include "TAttLine.h" //*KEND. #endif class TLine : public TObject, public TAttLine { protected: Coord_t fX1; //X of 1st point Coord_t fY1; //Y of 1st point Coord_t fX2; //X of 2nd point Coord_t fY2; //Y of 2nd point protected: virtual Int_t DistancetoPrimitive(Int_t px, Int_t py); virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py); public: TLine(); TLine(Coord_t x1, Coord_t y1,Coord_t x2, Coord_t y2); TLine(const TLine &line); virtual ~TLine(); void Copy(TObject &line); virtual void Draw(Option_t *option=""); virtual TLine *DrawLine(Coord_t x1, Coord_t y1,Coord_t x2, Coord_t y2); virtual TLine *DrawLineNDC(Coord_t x1, Coord_t y1,Coord_t x2, Coord_t y2); Coord_t GetX1() {return fX1;} Coord_t GetX2() {return fX2;} Coord_t GetY1() {return fY1;} Coord_t GetY2() {return fY2;} virtual void ls(Option_t *option=""); virtual void Paint(Option_t *option=""); virtual void PaintLine(Coord_t x1, Coord_t y1,Coord_t x2, Coord_t y2); virtual void PaintLineNDC(Coord_t u1, Coord_t v1,Coord_t u2, Coord_t v2); virtual void Print(Option_t *option=""); virtual void SavePrimitive(ofstream &out, Option_t *option); virtual void SetX1(Coord_t x1) {fX1=x1;} virtual void SetX2(Coord_t x2) {fX2=x2;} virtual void SetY1(Coord_t y1) {fY1=y1;} virtual void SetY2(Coord_t y2) {fY2=y2;} ClassDef(TLine,1) //A line segment }; #endif