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]);
122 std::to_string((
int)
attr.GetLineColor()) +
":" +
123 std::to_string((
int)
attr.GetLineStyle()) +
":" +
124 std::to_string((
int)
attr.GetLineWidth()));
139 std::to_string((
int)
attr.GetFillColor()) +
":" +
140 std::to_string((
int)
attr.GetFillStyle()));
150 std::to_string((
int)
attr.GetTextColor()) +
":" +
151 std::to_string((
int)
attr.GetTextFont()) +
":" +
152 std::to_string((
int) (
attr.GetTextSize()>=1 ?
attr.GetTextSize() : -1000*
attr.GetTextSize())) +
":" +
153 std::to_string((
int)
attr.GetTextAlign()) +
":" +
154 std::to_string((
int)
attr.GetTextAngle()));
170 std::to_string((
int)
attr.GetMarkerColor()) +
":" +
171 std::to_string((
int)
attr.GetMarkerStyle()) +
":" +
172 std::to_string((
int)
attr.GetMarkerSize()));
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());
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t attr
const Float_t * GetArray() const
void Set(Int_t n) override
Set size of this array to n floats.
Fill Area Attributes class.
virtual Color_t GetFillColor() const
Return the fill area color.
virtual Style_t GetFillStyle() const
Return the fill area style.
virtual void SetFillStyle(Style_t fstyle)
Set the fill area style.
virtual Color_t GetLineColor() const
Return the line color.
virtual Width_t GetLineWidth() const
Return the line width.
virtual void SetLineWidth(Width_t lwidth)
Set 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 void SetMarkerStyle(Style_t mstyle=1)
Set the marker style.
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.
The color creation and management class.
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.
Short_t Max(Short_t a, Short_t b)
Returns the largest of a and b.