66 bool isany_special =
false;
69 for (
auto p = str; *p; ++p) {
70 if ((*p < 32) || (*p > 126) || (*p ==
';') || (*p ==
'\'') || (*p ==
'\"') || (*p ==
'%')) {
77 return std::string(
"t") + str;
80 std::string oper(
"h");
81 static const char *digits =
"0123456789abcdef";
82 for (
auto p = str; *p; ++p) {
83 unsigned code = (unsigned)*p;
84 oper.append(1, digits[(code >> 4) & 0xF]);
85 oper.append(1, digits[code & 0xF]);
100 Int_t nextsz =
fBuf.GetSize() + std::max(1024, (sz/128 + 1) * 128);
189 std::vector<double> arr;
192 arr.emplace_back((
int) radial->GetGradientType());
194 arr.emplace_back(10);
196 arr.emplace_back(-1);
197 arr.emplace_back((
int) grad->GetCoordinateMode());
198 arr.emplace_back((
int) grad->GetNumberOfSteps());
199 for (
unsigned n = 0;
n < grad->GetNumberOfSteps(); ++
n)
200 arr.emplace_back(grad->GetColorPositions()[
n]);
201 for (
unsigned n = 0;
n < grad->GetNumberOfSteps()*4; ++
n)
202 arr.emplace_back(grad->GetColors()[
n]);
205 arr.emplace_back(linear->GetStart().fX);
206 arr.emplace_back(linear->GetStart().fY);
207 arr.emplace_back(linear->GetEnd().fX);
208 arr.emplace_back(linear->GetEnd().fY);
210 arr.emplace_back(radial->GetStart().fX);
211 arr.emplace_back(radial->GetStart().fY);
212 arr.emplace_back(radial->GetEnd().fX);
213 arr.emplace_back(radial->GetEnd().fY);
214 arr.emplace_back(radial->GetR1());
215 arr.emplace_back(radial->GetR2());
220 code.
Form(
"%d#%s", indx,
json.Data());
int Int_t
Signed integer 4 bytes (int).
float Float_t
Float 4 bytes (float).
virtual Color_t GetFillColor() const
Return the fill area color.
virtual Style_t GetFillStyle() const
Return the fill area style.
virtual Color_t GetLineColor() const
Return the line color.
virtual Width_t GetLineWidth() const
Return the line width.
virtual Style_t GetLineStyle() const
Return the line style.
virtual Style_t GetMarkerStyle() const
Return the marker style.
virtual Color_t GetMarkerColor() const
Return the marker color.
virtual Size_t GetMarkerSize() const
Return the marker size.
virtual Float_t GetTextSize() const
Return the text size.
virtual Short_t GetTextAlign() const
Return the text alignment.
virtual Font_t GetTextFont() const
Return the text font.
virtual Color_t GetTextColor() const
Return the text color.
virtual Float_t GetTextAngle() const
Return the text angle.
static TString ToJSON(const T *obj, Int_t compact=0, const char *member_name=nullptr)
@ kNoSpaces
no new lines plus remove all spaces around "," and ":" symbols
TColorGradient extends basic TColor.
TClass * IsA() const override
const char * Data() const
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
void AddColor(Int_t indx, TColor *col)
Add custom color to operations.
TWebPainting()
Constructor.
void AddTextAttr(const TAttText &attr)
Store text attributes If attributes were not changed - ignore operation.
TAttMarker fLastMarker
! last marker attributes
void AddMarkerAttr(const TAttMarker &attr)
Store marker attributes If attributes were not changed - ignore operation.
void AddLineAttr(const TAttLine &attr)
Store line attributes If attributes were not changed - ignore operation.
static std::string MakeTextOper(const char *str)
Create text operation If text include special symbols - use simple hex coding.
Int_t fSize
! filled buffer size
TAttFill fLastFill
! last fill attributes
std::string fOper
list of operations, separated by semicolons
void AddOper(const std::string &oper)
Add next custom operator to painting Operations are separated by semicolons Following operations are ...
Float_t * Reserve(Int_t sz)
Reserve place in the float buffer Returns pointer on first element in reserved area.
TArrayF fBuf
array of points for all operations
TAttLine fLastLine
! last line attributes
void AddFillAttr(const TAttFill &attr)
Store fill attributes If attributes were not changed - ignore operation.