25 if (
v) res = std::to_string(
v);
30 if ((
v > 0) && !res.empty())
33 if ((
v != 0) || res.empty()) {
34 res += std::to_string(
v);
39 if (!
Empty() && res.empty())
68 std::string val = value;
71 while (!val.empty()) {
73 while ((pos < val.length()) && ((val[pos] ==
' ') || (val[pos] ==
'\t')))
76 if (pos >= val.length())
79 if ((val[pos] ==
'-') || (val[pos] ==
'+')) {
82 R__ERROR_HERE(
"gpadv7") <<
"Fail to parse RPadLength " << value;
85 operand = (val[pos] ==
'-') ? -1 : 1;
98 v = std::stod(val, &pos);
106 if (!operand) operand = 1;
108 if ((val.length() > 0) && (val[0] ==
'%')) {
110 SetNormal(GetNormal() + operand*0.01*
v);
111 }
else if ((val.length() > 1) && (val[0] ==
'p') && (val[1] ==
'x')) {
115 SetNormal(GetNormal() + operand*
v);
#define R__ERROR_HERE(GROUP)
static void GetPixel(int y, int width, Byte_t *scline)
Get pixels in line y and put in array scline.
std::string AsString() const
Converts RPadLength to string like "0.1 + 25px" User coordinates not (yet) supported.
bool ParseString(const std::string &val)
Parse string and fill RPadLength attributes String can be like "0.1 + 25px" User coordinates not (yet...