File indexing completed on 2025-01-30 10:22:35
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef ROOT7_RLine
0010 #define ROOT7_RLine
0011
0012 #include <ROOT/ROnFrameDrawable.hxx>
0013 #include <ROOT/RAttrLine.hxx>
0014 #include <ROOT/RPadPos.hxx>
0015
0016 #include <initializer_list>
0017
0018 namespace ROOT {
0019 namespace Experimental {
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029 class RLine : public ROnFrameDrawable {
0030
0031 RPadPos fP1, fP2;
0032 public:
0033 RAttrLine line{this, "line"};
0034
0035 RLine() : ROnFrameDrawable("line") {}
0036
0037 RLine(const RPadPos &p1, const RPadPos &p2) : RLine()
0038 {
0039 fP1 = p1;
0040 fP2 = p2;
0041 }
0042
0043 RLine &SetP1(const RPadPos &p1)
0044 {
0045 fP1 = p1;
0046 return *this;
0047 }
0048
0049 RLine &SetP2(const RPadPos &p2)
0050 {
0051 fP2 = p2;
0052 return *this;
0053 }
0054
0055 const RPadPos &GetP1() const { return fP1; }
0056 const RPadPos &GetP2() const { return fP2; }
0057 };
0058
0059 }
0060 }
0061
0062 #endif