File indexing completed on 2025-01-18 10:12:35
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 fOper;
0029 Int_t fSize{0};
0030 TArrayF fBuf;
0031 TAttLine fLastLine;
0032 TAttFill fLastFill;
0033 TAttMarker fLastMarker;
0034
0035 public:
0036
0037 TWebPainting();
0038 ~TWebPainting() override = default;
0039
0040 Bool_t IsEmpty() const { return fOper.empty() && (fBuf.GetSize() == 0); }
0041
0042 void AddOper(const std::string &oper);
0043
0044 void AddLineAttr(const TAttLine &attr);
0045 void AddFillAttr(const TAttFill &attr);
0046 void AddTextAttr(const TAttText &attr);
0047 void AddMarkerAttr(const TAttMarker &attr);
0048
0049 Float_t *Reserve(Int_t sz);
0050
0051 void AddColor(Int_t indx, TColor *col);
0052
0053
0054 void FixSize() { fBuf.Set(fSize); }
0055
0056 static std::string MakeTextOper(const char *str);
0057
0058
0059 ClassDefOverride(TWebPainting, 1)
0060 };
0061
0062 #endif