File indexing completed on 2025-09-16 09:10:07
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef ROOT_TWebPainting
0012 #define ROOT_TWebPainting
0013
0014 #include "TObject.h"
0015 #include "TAttLine.h"
0016 #include "TAttFill.h"
0017 #include "TAttText.h"
0018 #include "TAttMarker.h"
0019 #include "TArrayF.h"
0020
0021 class TColor;
0022
0023 #include <string>
0024
0025 class TWebPainting : public TObject {
0026
0027 protected:
0028 std::string fClassName;
0029 std::string fObjectName;
0030 std::string fOper;
0031 Int_t fSize{0};
0032 TArrayF fBuf;
0033 TAttLine fLastLine;
0034 TAttFill fLastFill;
0035 TAttMarker fLastMarker;
0036
0037 public:
0038
0039 TWebPainting();
0040 ~TWebPainting() override = default;
0041
0042 void SetClassName(const std::string &classname) { fClassName = classname; }
0043 const std::string &GetClassName() const { return fClassName; }
0044
0045 void SetObjectName(const std::string &objname) { fObjectName = objname; }
0046 const std::string &GetObjectName() const { return fObjectName; }
0047
0048 Bool_t IsEmpty() const { return fOper.empty() && (fBuf.GetSize() == 0); }
0049
0050 void AddOper(const std::string &oper);
0051
0052 void AddLineAttr(const TAttLine &attr);
0053 void AddFillAttr(const TAttFill &attr);
0054 void AddTextAttr(const TAttText &attr);
0055 void AddMarkerAttr(const TAttMarker &attr);
0056
0057 Float_t *Reserve(Int_t sz);
0058
0059 void AddColor(Int_t indx, TColor *col);
0060
0061
0062 void FixSize() { fBuf.Set(fSize); }
0063
0064 static std::string MakeTextOper(const char *str);
0065
0066
0067 ClassDefOverride(TWebPainting, 2)
0068 };
0069
0070 #endif