159 doFill(
fX.size(),
fX.data(),
fY.data());
170 for (std::size_t i = 0; i <
fX.size(); ++i) {
175 Double_t yc[5] = { my - dy, my, my + dy, my, my - dy };
181 Double_t yl[5] = { my - dy, my - dy, my + dy, my + dy, my - dy };
316 :
TVirtualPad(
name,title,xlow,ylow,xup,yup,color,bordersize,bordermode)
399 Error(
"TPad",
"You must create a TCanvas before creating a TPad");
408 if ((xlow < 0) || (xlow > 1) || (ylow < 0) || (ylow > 1)) {
409 Error(
"TPad",
"illegal bottom left position: x=%f, y=%f", xlow, ylow);
411 }
else if ((xup < 0) || (xup > 1) || (yup < 0) || (yup > 1)) {
412 Error(
"TPad",
"illegal top right position: x=%f, y=%f", xup, yup);
414 }
else if (xup-xlow <= 0) {
415 Error(
"TPad",
"illegal width: %f", xup-xlow);
417 }
else if (yup-ylow <= 0) {
418 Error(
"TPad",
"illegal height: %f", yup-ylow);
436 SetPad(
name, title, xlow, ylow, xup, yup, color, bordersize, bordermode);
578 while (
auto exec =
static_cast<TExec *
>(next()))
624 if (!lop)
return nullptr;
625 TList *lof =
nullptr;
632 auto AddEntryFromListOfFunctions = [&]() {
634 while ((obj = nextobj())) {
643 leg->AddEntry(obj, mes.
Data(),
"lpf");
647 while(
auto o = next()) {
653 if (o->InheritsFrom(
TNamed::Class()) && strlen(o->GetTitle()))
655 else if (strlen(o->GetName()))
658 mes = o->ClassName();
671 lof = ((
TH1 *)o)->GetListOfFunctions();
672 AddEntryFromListOfFunctions();
675 lof = ((
TGraph *)o)->GetListOfFunctions();
676 AddEntryFromListOfFunctions();
682 TIter nextgraph(grlist);
684 while ((obj = nextgraph())) {
696 leg->AddEntry(obj, mes.
Data(), opt);
699 AddEntryFromListOfFunctions();
704 TIter nexthist(hlist);
705 while ((obj = nexthist())) {
709 else if (strlen(hist->
GetName()))
717 leg->AddEntry( obj, mes.
Data(), opt );
726 Info(
"BuildLegend",
"No object(s) to build a TLegend.");
769 while (
auto obj = next()) {
772 if (
n == subpadnumber) {
773 return ((
TPad*)obj)->
cd();
813 if (pp && pp->GetPS())
840 for (
Int_t i=0;i<2;i++) {
853 while(code1 + code2) {
864 if (ic == 0) ic = code2;
866 yt =
y[0] + (
y[1]-
y[0])*(xclipl-
x[0])/(
x[1]-
x[0]);
870 yt =
y[0] + (
y[1]-
y[0])*(xclipr-
x[0])/(
x[1]-
x[0]);
874 xt =
x[0] + (
x[1]-
x[0])*(yclipb-
y[0])/(
y[1]-
y[0]);
878 xt =
x[0] + (
x[1]-
x[0])*(yclipt-
y[0])/(
y[1]-
y[0]);
884 code1 =
ClippingCode(xt,yt,xclipl,yclipb,xclipr,yclipt);
888 code2 =
ClippingCode(xt,yt,xclipl,yclipb,xclipr,yclipt);
902 for (
Int_t i=0;i<2;i++) {
911 if (
x[0] < xclipl) code1 = code1 | 0x1;
912 if (
x[0] > xclipr) code1 = code1 | 0x2;
913 if (
y[0] < yclipb) code1 = code1 | 0x4;
914 if (
y[0] > yclipt) code1 = code1 | 0x8;
916 if (
x[1] < xclipl) code2 = code2 | 0x1;
917 if (
x[1] > xclipr) code2 = code2 | 0x2;
918 if (
y[1] < yclipb) code2 = code2 | 0x4;
919 if (
y[1] > yclipt) code2 = code2 | 0x8;
923 while(code1 + code2) {
934 if (ic == 0) ic = code2;
936 yt =
y[0] + (
y[1]-
y[0])*(xclipl-
x[0])/(
x[1]-
x[0]);
940 yt =
y[0] + (
y[1]-
y[0])*(xclipr-
x[0])/(
x[1]-
x[0]);
944 xt =
x[0] + (
x[1]-
x[0])*(yclipb-
y[0])/(
y[1]-
y[0]);
948 xt =
x[0] + (
x[1]-
x[0])*(yclipt-
y[0])/(
y[1]-
y[0]);
954 code1 =
ClippingCode(xt,yt,xclipl,yclipb,xclipr,yclipt);
958 code2 =
ClippingCode(xt,yt,xclipl,yclipb,xclipr,yclipt);
971 if (
x < xcl1) code = code | 0x1;
972 if (
x > xcl2) code = code | 0x2;
973 if (
y < ycl1) code = code | 0x4;
974 if (
y > ycl2) code = code | 0x8;
1025 std::vector<Double_t> xc2(nn), yc2(nn);
1032 for (i = 0; i <
n; i++) {
1041 xc2[nc2] = xclipl; yc2[nc2++] = slope*(xclipl-
x1)+
y1;
1043 xc2[nc2] =
x2; yc2[nc2++] =
y2;
1047 xc2[nc2] = xclipl; yc2[nc2++] = slope*(xclipl-
x1)+
y1;
1048 xc2[nc2] =
x2; yc2[nc2++] =
y2;
1060 for (i = 0; i < nc2; i++) {
1061 x2 = xc2[i];
y2 = yc2[i];
1069 xc[nc] =
x1+(yclipt-
y1)*slope; yc[nc++] = yclipt;
1071 xc[nc] =
x2; yc[nc++] =
y2;
1075 xc[nc] =
x1+(yclipt-
y1)*slope; yc[nc++] = yclipt;
1076 xc[nc] =
x2; yc[nc++] =
y2;
1087 for (i = 0; i < nc; i++) {
1088 x2 = xc[i];
y2 = yc[i];
1096 xc2[nc2] = xclipr; yc2[nc2++] = slope*(xclipr-
x1)+
y1;
1098 xc2[nc2] =
x2; yc2[nc2++] =
y2;
1102 xc2[nc2] = xclipr; yc2[nc2++] = slope*(xclipr-
x1)+
y1;
1103 xc2[nc2] =
x2; yc2[nc2++] =
y2;
1115 for (i = 0; i < nc2; i++) {
1116 x2 = xc2[i];
y2 = yc2[i];
1124 xc[nc] =
x1+(yclipb-
y1)*slope; yc[nc++] = yclipb;
1126 xc[nc] =
x2; yc[nc++] =
y2;
1130 xc[nc] =
x1+(yclipb-
y1)*slope; yc[nc++] = yclipb;
1131 xc[nc] =
x2; yc[nc++] =
y2;
1176 if (!
gROOT->GetListOfCanvases())
return;
1178 gROOT->GetListOfCanvases()->Remove(
this);
1200 if (
gROOT->GetSelectedPad() ==
this)
1201 gROOT->SetSelectedPad(
nullptr);
1228 while (
auto obj = next()) {
1229 if (
auto pad =
dynamic_cast<TPad*
>(obj)) {
1260 Int_t pxl, pyl, pxt, pyt;
1265 if (px1 < px2) {pxl = px1; pxt = px2;}
1266 else {pxl = px2; pxt = px1;}
1267 if (py1 < py2) {pyl = py1; pyt = py2;}
1268 else {pyl = py2; pyt = py1;}
1272 if ( (px > pxl && px < pxt) && (py > pyl && py < pyt) ) {
1279 if (py < pyl) dxl += pyl - py;
1280 if (py > pyt) dxl += py - pyt;
1282 if (py < pyl) dxt += pyl - py;
1283 if (py > pyt) dxt += py - pyt;
1285 if (px < pxl) dyl += pxl - px;
1286 if (px > pxt) dyl += px - pxt;
1288 if (px < pxl) dyt += pxl - px;
1289 if (px > pxt) dyt += px - pxt;
1291 Int_t distance = dxl;
1292 if (dxt < distance) distance = dxt;
1293 if (dyl < distance) distance = dyl;
1294 if (dyt < distance) distance = dyt;
1368 arr[1] =
this; arr[2] = (
void*)&nx;arr[3] = (
void*)& ny;
1369 arr[4] = (
void*)&xmargin; arr[5] = (
void *)& ymargin; arr[6] = (
void *)&color;
1370 if ((*
gThreadXAR)(
"PDCD", 7, arr,
nullptr))
return;
1376 if (nx <= 0) nx = 1;
1377 if (ny <= 0) ny = 1;
1384 if (xmargin >= 0 && ymargin >= 0) {
1388 for (iy=0;iy<ny;iy++) {
1389 y2 = 1 - iy*dy - ymargin;
1390 y1 =
y2 - dy + 2*ymargin;
1392 if (
y1 >
y2)
continue;
1393 for (ix=0;ix<nx;ix++) {
1394 x1 = ix*dx + xmargin;
1395 x2 =
x1 +dx -2*xmargin;
1396 if (
x1 >
x2)
continue;
1421 for (
Int_t i=0;i<nx;i++) {
1425 if (i == nx-1)
x2 = 1-xr;
1426 for (
Int_t j=0;j<ny;j++) {
1427 number = j*nx + i +1;
1430 if (j == 0)
y2 = 1-yt;
1431 if (j == ny-1)
y1 = 0;
1462 const std::vector<double>& widthRatios,
1463 const std::vector<double>& heightRatios,
1464 const double canvasTopMargin,
1465 const double canvasLeftMargin
1470 int wrs = widthRatios.size();
1471 int hrs = heightRatios.size();
1474 if (wrs==0) nxl = nx;
1475 if (hrs==0) nyl = ny;
1485 if (canvasTopMargin <0 || canvasTopMargin >1 ) {
1486 Error(
"DivideRatios",
"The canvas top margin must be >= 0 and <= 1");
1489 y = 1.- canvasTopMargin;
1491 if (canvasLeftMargin <0 || canvasLeftMargin >1 ) {
1492 Error(
"DivideRatios",
"The canvas left margin must be >= 0 and <= 1");
1497 double sumOfHeightRatios = canvasTopMargin;
1499 for (
int i=0; i<nyl; i++) {
1500 yr = heightRatios[i];
1501 sumOfHeightRatios = sumOfHeightRatios + yr;
1502 if (yr <0 || yr >1 ) {
1503 Error(
"DivideRatios",
"Y ratios plus the top margin must be >= 0 and <= 1");
1508 if (sumOfHeightRatios > 1.) {
1509 Error(
"DivideRatios",
"The sum of Y ratios plus the top margin must be <= 1 %g",sumOfHeightRatios);
1512 double sumOfWidthRatios = canvasLeftMargin;
1514 for (
int j=0; j<nxl; j++) {
1515 xr = widthRatios[j];
1516 sumOfWidthRatios = sumOfWidthRatios +xr;
1517 if (xr <0 || xr >1 ) {
1518 Error(
"DivideRatios",
"X ratios must be >= 0 and <= 1");
1523 if (sumOfWidthRatios > 1.) {
1524 Error(
"DivideRatios",
"The sum of X ratios must be <= 1 %g ",sumOfWidthRatios);
1529 for (
int i=0; i<nyl; i++) {
1530 x = canvasLeftMargin;
1531 if (hrs) yr = heightRatios[i];
1533 for (
int j=0; j<nxl; j++) {
1534 if (wrs) xr = widthRatios[j];
1560 Error(
"DivideSquare",
"No canvas associated with this pad.");
1573 Divide(
w,
h, xmargin, ymargin, color);
1583 gROOT->MakeDefCanvas();
1620 if (!classobj)
return;
1622 const Int_t kMAXLEVELS = 10;
1623 TClass *clevel[kMAXLEVELS], *cl, *cll;
1625 TText *ptext =
nullptr;
1628 Int_t nd,nf,nc,nkd,nkf,i,j;
1641 Range(0,0,xpad,ypad);
1646 clevel[nlevel] = obj;
1655 if (nlevel >= maxlev-1)
break;
1659 Int_t ilevel, nelem;
1660 for (ilevel=nlevel;ilevel>=0;ilevel--) {
1661 cl = clevel[ilevel];
1663 if (nelem > maxelem) maxelem = nelem;
1664 nc = (nelem/50) + 1;
1674 if (dx < 1.3) dx = 1.3;
1675 tsizcm = tsizcm - 0.03*
Double_t(ncdraw-5);
1676 if (tsizcm < 0.27) tsizcm = 0.27;
1681 for (ilevel=nlevel;ilevel>=0;ilevel--) {
1682 cl = clevel[ilevel];
1684 if (nelem > maxelem) maxelem = nelem;
1685 nc = (nelem/50) + 1;
1687 if (ilevel < nlevel)
x1 =
x2 + 0.5;
1718 if (
box)
box->SetFillColor(17);
1731 if (i >= nkd) { i = 1;
y =
y1 - 0.5*dy;
x += 1/
Double_t(nc); }
1732 else { i++;
y -= dy; }
1736 Int_t dim =
d->GetArrayDim();
1738 snprintf(dname,256,
"%s",
d->GetName());
1740 while (indx < dim ){
1741 ldname = strlen(dname);
1742 snprintf(&dname[ldname],256-ldname,
"[%d]",
d->GetMaxIndex(indx));
1763 while ((
m = (
TMethod *) nextm())) {
1765 !strcmp(
m->
GetName(),
"Dictionary" ) ||
1766 !strcmp(
m->
GetName(),
"Class_Version" ) ||
1767 !strcmp(
m->
GetName(),
"DeclFileName" ) ||
1768 !strcmp(
m->
GetName(),
"DeclFileLine" ) ||
1769 !strcmp(
m->
GetName(),
"ImplFileName" ) ||
1770 !strcmp(
m->
GetName(),
"ImplFileLine" )
1773 if (fcount > nf)
break;
1774 if (i >= nkf) { i = 1;
y = ysep - 0.5*dy;
x += 1/
Double_t(nc); }
1775 else { i++;
y -= dy; }
1780 for (j=ilevel-1;j>=0;j--) {
1781 if (cl == clevel[ilevel]) {
1782 if (clevel[j]->GetMethodAny((
char*)
m->
GetName())) {
1825 auto cpad =
static_cast<TPad *
>(
gPad);
1837 Int_t px = cpad->GetEventX();
1838 Int_t py = cpad->GetEventY() + 1;
1839 if (canvas->GetCrosshair() > 1) {
1857 uu[0] = umin; uu[1] = umax;
1858 vv[0] =
vv[1] = 1. - 1. * py / canvas->GetWh();
1859 canvas->PaintPolyLineNDC(2, uu,
vv,
"icrosshair1");
1860 uu[0] = uu[1] = 1. * px / canvas->GetWw();
1861 vv[0] = vmin;
vv[1] = vmax;
1862 canvas->PaintPolyLineNDC(2, uu,
vv,
"icrosshair2");
1905 Warning(
"DrawFrame",
"Must be called for the current pad only");
1912 if (hframe)
delete hframe;
1920 std::vector<Double_t> xbins(nbins+1);
1922 for (
Int_t i=1;i<=nbins;i++) {
1925 hframe =
new TH1F(
"hframe",title,nbins,xbins.data());
1948 Double_t xlow, ylow, xup, yup, hs, ws;
1953 gPad->SetFillColor(0);
1958 text.SetTextFont(61);
1959 text.SetTextSize(0.07);
1960 text.SetTextAlign(22);
1967 for (i=0;i<10;i++) {
1974 box.SetFillStyle(1001);
1975 box.SetFillColor(color);
1976 box.DrawBox(xlow, ylow, xup, yup);
1977 box.SetFillStyle(0);
1978 box.SetLineColor(1);
1979 box.DrawBox(xlow, ylow, xup, yup);
1980 if (color == 1)
text.SetTextColor(0);
1981 else text.SetTextColor(1);
2026 auto setNewValues = [&inter, &parent,
this]() {
2063 if (!inter) inter = &dummy;
2085 if (!inter->ProcessMouseMove(parent, px, py,
kTRUE,
kTRUE, ratio))
2089 inter->ApplyChanges(parent);
2091 if (inter->IsOpaque(parent)) {
2102 if (inter && inter->IsOpaque(parent))
2105 if (
gROOT->IsEscaped()) {
2107 if (inter && inter->IsOpaque(parent)) {
2110 fWNDC = inter->oldX2;
2111 fHNDC = inter->oldY2;
2116 }
else if (inter && !inter->IsOpaque(parent) && (inter->newX1 != inter->newX2)) {
2179 xx[0] = xx[1] = zbx1;
2180 xx[2] = xx[3] = zbx2;
2181 yy[0] = yy[2] = zby1;
2182 yy[1] = yy[3] = zby2;
2184 xx[0] = xx[2] = zbx1;
2185 xx[1] = xx[3] = zbx2;
2186 yy[0] = yy[1] = zby1;
2187 yy[2] = yy[3] = zby2;
2192 pad.
PaintBox(zbx1, zby1, zbx2, zby2,
"iaxiszoom");
2226 if (strstr(opt,
"cont4")) {
2239 inter->axisNumber = 1;
2240 if (!strcmp(axis->
GetName(),
"xaxis"))
2242 else if (!strcmp(axis->
GetName(),
"yaxis"))
2244 else if (!strcmp(axis->
GetName(),
"zaxis"))
2245 inter->axisNumber = 3;
2248 }
else if (inter->axisNumber == 1) {
2252 inter->px2old = inter->px1old;
2259 inter->py2old = inter->py1old;
2268 }
else if (inter->axisNumber == 1) {
2275 inter->PaintZoomBox(*
this);
2309 if (
gROOT->IsEscaped()) {
2314 if (view && inter) {
2316 if (inter->ratio1 > inter->ratio2)
2317 std::swap(inter->ratio1, inter->ratio2);
2318 if (inter->ratio2 - inter->ratio1 > 0.05) {
2320 if (inter->axisNumber == 3 && hobj && hobj->GetDimension() != 3) {
2322 Float_t zmax = hobj->GetMaximum();
2324 if (zmin <= 0 && zmax > 0)
2329 Float_t newmin = zmin + (zmax - zmin) * inter->ratio1;
2330 Float_t newmax = zmin + (zmax - zmin) * inter->ratio2;
2332 newmin = hobj->GetBinContent(hobj->GetMinimumBin());
2334 newmax = hobj->GetBinContent(hobj->GetMaximumBin());
2339 hobj->SetMinimum(newmin);
2340 hobj->SetMaximum(newmax);
2355 if (inter->axisNumber == 1) {
2363 }
else if (inter->axisNumber == 2) {
2373 xmin = inter->ratio1;
2374 xmax = inter->ratio2;
2378 std::swap(inter->ratio1, inter->ratio2);
2387 xmin = ((
xmin - xmi) / (xma - xmi)) * (up - low) + low;
2388 xmax = ((
xmax - xmi) / (xma - xmi)) * (up - low) + low;
2391 if (!strcmp(axis->
GetName(),
"xaxis"))
2392 inter->axisNumber = 1;
2393 if (!strcmp(axis->
GetName(),
"yaxis"))
2394 inter->axisNumber = 2;
2395 if (inter->ratio2 - inter->ratio1 > 0.05) {
2400 if (inter->axisNumber == 1)
2402 if (inter->axisNumber == 2 && hobj1) {
2418 while (
auto obj = next()) {
2419 if (
auto hobj =
dynamic_cast<TH1 *
> (obj)) {
2422 bin1 = hobj->GetXaxis()->FindFixBin(
xmin);
2423 bin2 = hobj->GetXaxis()->FindFixBin(
xmax);
2424 if (inter->axisNumber == 1) {
2425 hobj->GetXaxis()->SetRange(bin1,bin2);
2426 }
else if (inter->axisNumber == 2) {
2427 if (hobj->GetDimension() == 1) {
2430 if (hobj->GetNormFactor() != 0) {
2431 Double_t norm = hobj->GetSumOfWeights()/hobj->GetNormFactor();
2435 hobj->SetMinimum(xxmin);
2436 hobj->SetMaximum(xxmax);
2439 bin1 = hobj->GetYaxis()->FindFixBin(
xmin);
2440 bin2 = hobj->GetYaxis()->FindFixBin(
xmax);
2441 hobj->GetYaxis()->SetRange(bin1,bin2);
2473 if (found)
return found;
2475 while (
auto cur = next()) {
2478 if (found)
return found;
2493 if (found)
return found;
2495 while (
auto cur = next()) {
2498 if (found)
return found;
2581 if (
fCanvas ==
this)
return nullptr;
2590 if (
fCanvas ==
this)
return nullptr;
2599 if (
fCanvas ==
this)
return nullptr;
2680 while (
auto obj = next())
2681 if (
auto p =
dynamic_cast<TPad *
>(obj))
2682 mask |=
p->IsAnyNeedRepaint();
2822 while ((obj=next())) {
2826 if (found)
return found;
2836 if (!subpadnumber) {
2843 while ((obj = next())) {
2846 if (pad->
GetNumber() == subpadnumber)
return pad;
2914 gROOT->SetSelectedPad(
this);
2984 if (i>=ncolors) i = ncolors-1;
2996 Int_t const cellSize = 10;
3003 for (
int i = 0; i <
fCGnx; i++)
3004 for (
int j = 0; j <
fCGny; j++)
3010 while(
auto o = iter()) {
3023 while (
auto og = nextgraph())
3027 while (
auto oh = nexthist()) {
3041 for (
int r = i;
r <
w + i;
r++) {
3042 for (
int c = j;
c <
h + j;
c++) {
3077 bool isFirstVertical =
false;
3078 bool isFirstHorizontal =
false;
3080 for (std::size_t i = 0;
option[i] !=
'\0'; ++i) {
3081 char letter = std::tolower(
option[i]);
3082 if (letter ==
'w') {
3087 }
else if (letter ==
't' || letter ==
'b') {
3088 isFirstVertical = !isFirstHorizontal;
3090 dy = letter ==
't' ? -1 : 1;
3091 }
else if (letter ==
'l' || letter ==
'r') {
3092 isFirstHorizontal = !isFirstVertical;
3094 dx = letter ==
'r' ? -1 : 1;
3098 if(dx < 0) std::swap(nxbeg, nxend);
3099 if(dy < 0) std::swap(nybeg, nyend);
3101 auto attemptPlacement = [&](
Int_t i,
Int_t j) {
3111 if(!isFirstVertical) {
3112 for (
Int_t i = nxbeg; i != nxend; i += dx) {
3113 for (
Int_t j = nybeg; j != nyend; j += dy) {
3114 if (attemptPlacement(i, j))
return true;
3119 for (
Int_t j = nybeg; j != nyend; j += dy) {
3120 for (
Int_t i = nxbeg; i != nxend; i += dx) {
3121 if (attemptPlacement(i, j))
return true;
3130#define NotFree(i, j) fCollideGrid[TMath::Max(TMath::Min(i + j * fCGnx, (fCGnx * fCGny) - 1), 0)] = kFALSE;
3159 for (i=
x1+1; i<
x2; i++) {
3169 for (j=
y1+1; j<
y2; j++) {
3189 for (
int i =
x1; i<=
x2; i++) {
3208 for (i =
x1; i<=
x2; i++) {
3213 for (i =
y1; i<=
y2; i++) {
3231 for (
Int_t i=s; i<
n; i=i+s) {
3233 g->GetPoint(i ,
x2,
y2);
3260 if (
name.Index(
"hframe") >= 0)
return;
3265 bool haserrors =
false;
3266 TString drawOption =
h->GetDrawOption();
3270 if (drawOption.
Index(
"hist") < 0) {
3271 if (drawOption.
Index(
"e") >= 0) haserrors =
true;
3274 Int_t nx =
h->GetNbinsX();
3279 for (i = 1; i<nx; i++) {
3281 x1l =
h->GetBinCenter(i);
3287 y1l =
h->GetBinContent(i)-
h->GetBinErrorLow(i);
3293 y2l =
h->GetBinContent(i)+
h->GetBinErrorUp(i);
3299 for (j=
y1; j<
y2; j++) {
3303 x1l =
h->GetBinLowEdge(i);
3309 y1l =
h->GetBinContent(i);
3316 x1l =
h->GetBinLowEdge(i)+
h->GetBinWidth(i);
3341 box.SetFillColorAlpha(
kRed,0.5);
3352 for (
int i = 0; i<
fCGnx; i++) {
3355 for (
int j = 0; j<
fCGny; j++) {
3372 box.DrawBox(X1L, Y1L, X2L, Y2L);
3374 box.SetFillColorAlpha(
kRed,t);
3375 box.DrawBox(X1L, Y1L, X2L, Y2L);
3379 if (t==0.15) t = 0.1;
3481 TObject *obj = lnk->GetObject();
3491 began3DScene =
kTRUE;
3494 obj->
Paint(lnk->GetOption());
3536 if (!
IsBatch() && (pp->IsCocoa() || (pp->IsNative() && (
style > 3000) && (
style < 3026))))
3537 pp->ClearDrawable();
3551 pp->SetAttFill({color, 1001});
3552 pp->SetOpacity(
style - 4000);
3554 }
else if ((
style >= 4000) && (
style <= 4100) && pp->IsCocoa() && (
this ==
fMother))
3556 else if ((color == 10) && (
style > 3000) && (
style < 3100))
3560 pp->SetAttFill({color,
style});
3561 pp->SetAttLine(*
this);
3574 box.SetFillColor(color);
3666 auto lnk = pList ? pList->
FirstLink() :
nullptr;
3670 ((
TPad*)obj)->PaintModified();
3695 Bool_t useXor = pp && pp->IsNative() && !pp->IsCocoa();
3704 auto lnk = pList ? pList->
FirstLink() :
nullptr;
3707 TObject *obj = lnk->GetObject();
3709 ((
TPad*)obj)->PaintModified();
3710 }
else if (needRepaint) {
3721 began3DScene =
kTRUE;
3724 obj->
Paint(lnk->GetOption());
3730 if (!useXor && needRepaint)
3762 auto savepad =
gPad;
3770 oper.second->Draw(*
this, pp, withXor);
3775 oper.second->Draw(*
this, pp, withXor);
3786 while (
auto obj = next()) {
3787 if (
auto pad =
dynamic_cast<TPad *
>(obj))
3788 pad->PaintOperations(withXor);
3810 fDrawOper[
option] = std::make_unique<TPadDrawOperation>(5,
x,
y, drawKind, pp->GetLineWidth());
3819 skip_fill = draw_border =
kTRUE;
3821 draw_border =
kTRUE;
3828 draw_border =
kTRUE;
3832 draw_fill =
style < 3026;
3835 draw_fill =
style > 4000;
3836 }
else if (
style > 0)
3837 draw_border =
kTRUE;
3839 if (draw_fill && !skip_fill)
3861 while (
auto obj = next()) {
3864 if (
auto pad =
dynamic_cast<TPad *
>(obj))
3865 pad->CopyBackgroundPixmaps(stop,
x,
y);
3873 Warning(
"PaintFillArea",
"Float_t signature is obsolete. Use Double_t signature.");
3895 std::vector<Double_t> xclip, yclip;
3899 xclip.resize(nc, 0.);
3900 yclip.resize(nc, 0.);
3921 Int_t fillstyle = pp->GetFillStyle();
3922 if (fillstyle >= 3100 && fillstyle < 4000)
3925 pp->DrawFillArea(nn, xx, yy);
3935 std::vector<Double_t> xw(
n), yw(
n);
3936 for (
int i=0; i<
n; i++) {
3978 static Double_t ang1[10] = { 0., 10., 20., 30., 45.,5., 60., 70., 80., 89.99};
3979 static Double_t ang2[10] = {180.,170.,160.,150.,135.,5.,120.,110.,100., 89.99};
3981 Int_t fasi = FillStyle % 1000;
3982 Int_t idSPA = fasi / 100;
3983 Int_t iAng2 = (fasi - 100 * idSPA) / 10;
3984 Int_t iAng1 = fasi % 10;
3992 TAttLine saveatt = pp->GetAttLine();
3994 pp->SetAttLine({ pp->GetAttFill().
GetFillColor(), 1, lw });
3997 if (ang1[iAng1] != 5.)
3999 if (ang2[iAng2] != 5.)
4002 pp->SetAttLine(saveatt);
4013 Int_t i, i1, i2, nbi;
4018 std::vector<Double_t> xli;
4019 std::vector<Double_t> yli;
4022 Double_t x,
y,
x1,
x2,
y1,
y2,
a,
b, xi, xip, xin, yi, yip;
4028 ratiox = 1./(rwxmax-rwxmin);
4029 ratioy = 1./(rwymax-rwymin);
4042 gPad->GetPadPar(x1p,y1p,x2p,y2p);
4051 for (i=1; i<=nn; i++) {
4052 x = wndc*ratiox*(xx[i-1]-rwxmin);
4053 y = hndc*ratioy*(yy[i-1]-rwymin);
4054 yrot = sina*
x+cosa*
y;
4061 while (dy * yindx >=
ymin) {
4062 ycur = dy * yindx--;
4068 for (i=2; i<=nn+1; i++) {
4071 if (i == nn+1) i2=1;
4073 x1 = wndc*ratiox*(xx[i1-1]-rwxmin);
4074 y1 = hndc*ratioy*(yy[i1-1]-rwymin);
4075 x2 = wndc*ratiox*(xx[i2-1]-rwxmin);
4076 y2 = hndc*ratioy*(yy[i2-1]-rwymin);
4078 xt1 = cosa*
x1-sina*
y1;
4079 yt1 = sina*
x1+cosa*
y1;
4080 xt2 = cosa*
x2-sina*
y2;
4081 yt2 = sina*
x2+cosa*
y2;
4092 if ((yi <= ycur) && (ycur < yip)) {
4111 a = (yt1-yt2)/(xt1-xt2);
4112 b = (yt2*xt1-xt2*yt1)/(xt1-xt2);
4124 if ((xi <= xin) && (xin < xip) &&
4133 std::sort(xli.begin(), xli.end());
4136 if ((nbi%2 != 0) || (nbi == 0))
4139 for (i=0; i<nbi; ++i) {
4141 Double_t ytmp = sinb*xli[i] + cosb*ycur;
4142 xli[i] = cosb*xli[i] - sinb*ycur;
4144 xli[i] = (xli[i]/wndc)*(rwxmax-rwxmin)+rwxmin;
4145 ytmp = (ytmp/hndc)*(rwymax-rwymin)+rwymin;
4146 yli.push_back(ytmp);
4149 gPad->PaintSegments(nbi/2, xli.data(), yli.data());
4169 pp->DrawLine(
x[0],
y[0],
x[1],
y[1]);
4182 pp->DrawLineNDC(u1,
v1, u2,
v2);
4199 for (i=0;i<3;i++) temp[i] = p1[i];
4201 for (i=0;i<3;i++) temp[i] = p2[i];
4203 PaintLine(xpad[0],xpad[1],xpad[3],xpad[4]);
4217 for (i=0;i<3;i++) temp[i] = p1[i];
4219 for (i=0;i<3;i++) temp[i] = p2[i];
4221 PaintLine(xpad[0],xpad[1],xpad[3],xpad[4]);
4240 if (
x<rmin[0] ||
x>rmax[0])
return;
4241 if (
y<rmin[1] ||
y>rmax[1])
return;
4242 if (z<rmin[2] || z>rmax[2])
return;
4267 Int_t i1 = -1,
np = 1, iclip = 0;
4268 for (
Int_t i = 0; i <
n - 1; i++) {
4283 if (iclip == 0 && i <
n-2)
4289 pp->DrawPolyLine(
np, &
x[i1], &
y[i1]);
4326 Int_t i1 = -1,
np = 1, iclip = 0;
4328 for (
Int_t i = 0; i <
n-1; i++) {
4343 if (iclip == 0 && i <
n-2)
4349 pp->DrawPolyLine(
np, &
x[i1], &
y[i1]);
4380 pp->DrawPolyLineNDC(
n,
x,
y);
4393 for (
Int_t i = 1; i <
n; i++)
4414 for (i=0; i<
n; i++) {
4418 if (i <
n-1)
continue;
4426 pp->DrawPolyMarker(
np, &
x[i1], &
y[i1]);
4449 for (i=0; i<
n; i++) {
4453 if (i <
n-1)
continue;
4462 pp->DrawPolyMarker(
np, &
x[i1], &
y[i1]);
4492 for (
Int_t i = 0; i < 2*
n; i+=2) {
4495 x[i] =
y[i] =
x[i+1] =
y[i+1] = 0;
4504 pp->DrawSegments(
n,
x,
y);
4520 pp->DrawSegmentsNDC(
n, u,
v);
4562 pp->DrawTextUrl(
x,
y,
text, url);
4610 if (!
gPad)
return nullptr;
4617 if (
this !=
gPad->GetCanvas()) {
4626 TPad *pick =
nullptr;
4627 TPad *picked =
this;
4631 pickobj = &dummyLink;
4660 pick = ((
TPad*)obj)->
Pick(px, py, pickobj);
4665 }
else if (!
gROOT->GetEditorMode()) {
4672 if (dist == 0)
break;
4687 if (
fView && !gotPrim) {
4706 if (!
button->IsEditable()) pickobj =
nullptr;
4711 if (picked ==
this) {
4734 while (
auto obj = next())
4931 const char *opt_default =
"ps";
4954 if (!title && opt.
Contains(
"gif+")) {
4957 }
else if (!title && opt.
Contains(
"gif")) {
4960 }
else if (!title && opt.
Contains(
"png")) {
4963 }
else if (!title && opt.
Contains(
"jpg")) {
4966 }
else if (!title && opt.
Contains(
"tiff")) {
4969 }
else if (!title && opt.
Contains(
"xpm")) {
4972 }
else if (!title && opt.
Contains(
"bmp")) {
4975 }
else if (!title && opt.
Contains(
"svg")) {
4977 }
else if (!title && opt.
Contains(
"pdf")) {
4979 }
else if (!title && opt.
Contains(
"html")) {
4984 Bool_t isweb = canv->IsWeb();
4985 Bool_t isbatch =
gROOT->IsBatch() || canv->IsBatch();
4994 auto cmd =
TString::Format(
"TWebCanvas::ProduceImage((TPad *) 0x%zx, \"%s\");", (
size_t)
this, psname.
Data());
4997 Error(
"Print",
"Fail create HTML file %s", psname.
Data());
5001 if (((!isbatch && image) || isweb) && pp) {
5002 Color_t hc = canv->GetHighLightColor();
5005 canv->SetHighLightColor(-1);
5010 auto res = pp->SaveAsImage(
this, psname.
Data(), gtype);
5013 canv->SetHighLightColor(hc);
5016 Warning(
"Print",
"Unsupported image format %s, fallback to TImageDump", psname.
Data());
5018 Info(
"Print",
"file %s has been created", psname.
Data());
5025 if (!title && opt.
Contains(
"cxx")) {
5031 if (!title && opt.
Contains(
"root")) {
5037 if (!title && opt.
Contains(
"xml")) {
5044 if (!title && opt.
Contains(
"json")) {
5063 if (
auto h =
gROOT->GetPluginManager()->FindHandler(
"TVirtualPS",
"svg")) {
5064 if (
h->LoadPlugin() == -1)
5081 if (wasModified && !
IsBatch())
5085 Info(
"Print",
"SVG file %s has been created", psname.
Data());
5107 if (
auto h =
gROOT->GetPluginManager()->FindHandler(
"TVirtualPS",
"tex")) {
5108 if (
h->LoadPlugin() == -1)
5115 if (strstr(opt,
"Standalone")) standalone =
kTRUE;
5128 if (wasModified && !
IsBatch())
5133 Info(
"Print",
"Standalone TeX file %s has been created", psname.
Data());
5135 Info(
"Print",
"TeX file %s has been created", psname.
Data());
5154 copen = psname.
EndsWith(
"(");
if (copen) psname[psname.
Length()-1] = 0;
5155 cclose = psname.
EndsWith(
")");
if (cclose) psname[psname.
Length()-1] = 0;
5156 copenb = psname.
EndsWith(
"[");
if (copenb) psname[psname.
Length()-1] = 0;
5157 ccloseb = psname.
EndsWith(
"]");
if (ccloseb) psname[psname.
Length()-1] = 0;
5161 if (copen || copenb) mustClose =
kFALSE;
5162 if (cclose || ccloseb) mustClose =
kTRUE;
5173 if (ratio < 1) pstype = 112;
5174 if (strstr(opt,
"Portrait")) pstype = 111;
5175 if (strstr(opt,
"Landscape")) pstype = 112;
5176 if (strstr(opt,
"eps")) pstype = 113;
5177 if (strstr(opt,
"Preview")) pstype = 113;
5184 const char *pluginName =
"ps";
5188 pluginName =
"image";
5190 if (
auto h =
gROOT->GetPluginManager()->FindHandler(
"TVirtualPS", pluginName)) {
5191 if (
h->LoadPlugin() == -1)
5200 if (titlePos !=
kNPOS) {
5210 if (!opt.
Contains(
"pdf") || image) {
5227 if (!copen)
Info(
"Print",
"%s file %s has been created", opt.
Data(), psname.
Data());
5228 else Info(
"Print",
"%s file %s has been created using the current canvas", opt.
Data(), psname.
Data());
5237 if (titlePos !=
kNPOS) {
5240 }
else if (!ccloseb) {
5244 if (cclose)
Info(
"Print",
"Current canvas added to %s file %s and file closed", opt.
Data(), psname.
Data());
5245 else Info(
"Print",
"%s file %s has been closed", opt.
Data(), psname.
Data());
5250 Info(
"Print",
"Current canvas added to %s file %s", opt.
Data(), psname.
Data());
5255 if (wasModified && !
IsBatch())
5261 gSystem->
Exec(
TString::Format(
"gs -quiet -dSAFER -dNOPLATFONTS -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer -dCompatibilityLevel=1.4 -dMaxSubsetPct=100 -dSubsetFonts=true -dEmbedAllFonts=true -sOutputFile=pdf_temp.pdf -f %s",
5276 Error(
"Range",
"illegal world coordinates range: x1=%f, y1=%f, x2=%f, y2=%f",
x1,
y1,
x2,
y2);
5314 Error(
"RangeAxis",
"illegal axis coordinates range: xmin=%f, ymin=%f, xmax=%f, ymax=%f",
5354 if (res && modified)
5399 TH1 *hobj =
nullptr;
5405 while ((obj = next())) {
5417 if (
g) hobj =
g->GetHistogram();
5434 gPad->GetUxmax(),
gPad->GetUymax());
5436 b->SetLineStyle(
gPad->GetFrameLineStyle());
5437 b->SetLineWidth(
gPad->GetFrameLineWidth());
5438 b->SetLineColor(
gPad->GetFrameLineColor());
5570 Error(
"ResizePad",
"Cannot resize pad. No current pad available.");
5573 if (
gPad->GetWw()==0.0||
gPad->GetWh()==0.0) {
5574 Warning(
"ResizePad",
"gPad has at least one zero dimension.");
5578 Warning(
"ResizePad",
"The pad has at least one zero dimension.");
5583 if (
this ==
gPad->GetCanvas()) {
5591 Warning(
"ResizePad",
"The parent pad has at least one zero dimension.");
5640 while (
auto obj = next()) {
5646 if (
gPad->IsBatch())
5649 if (pp->IsNative()) {
5651 auto attl = pp->GetAttLine();
5652 attl.SetLineColor(-1);
5653 pp->SetAttLine(attl);
5654 auto attt = pp->GetAttText();
5655 attt.SetTextSize(-1);
5657 pp->SetAttText(attt);
5668 Warning(
"ResizePad",
"Inf/NaN propagated to the pad. Check drawn objects.");
5669 if (w <= 0 || w > 10000) {
5670 Warning(
"ResizePad",
"%s width changed from %d to %d\n",
GetName(),
w,10);
5673 if (h <= 0 || h > 10000) {
5674 Warning(
"ResizePad",
"%s height changed from %d to %d\n",
GetName(),
h,10);
5743 ((
TPad*)
this)->Print(psname,
"gif");
5788 auto p = padName.
Index(
" ");
5794 static Int_t pcounter = 0;
5799 const char *pname = padName.
Data();
5802 if (padName.
Length() == 0) {
5804 if (
this ==
gPad->GetCanvas())
5811 if (
this !=
gPad->GetCanvas()) {
5813 out <<
"// ------------>Primitives in pad: " <<
GetName() <<
"\n";
5814 out <<
" TPad *" <<
cname <<
" = new TPad(\"" <<
GetName() <<
"\", \""
5817 out <<
" " <<
cname <<
"->Draw();\n";
5818 out <<
" " <<
cname <<
"->cd();\n";
5820 out <<
" " <<
cname <<
"->Range(" <<
fX1 <<
"," <<
fY1 <<
"," <<
fX2 <<
"," <<
fY2 <<
");\n";
5825 out <<
" TView::CreateView(1)->SetRange(" << rmin[0] <<
", " << rmin[1] <<
", " << rmin[2] <<
", " << rmax[0]
5826 <<
", " << rmax[1] <<
", " << rmax[2] <<
");\n";
5836 out <<
" " <<
cname <<
"->SetLogx();\n";
5838 out <<
" " <<
cname <<
"->SetLogy();\n";
5840 out <<
" " <<
cname <<
"->SetLogz();\n";
5842 out <<
" " <<
cname <<
"->SetGridx();\n";
5844 out <<
" " <<
cname <<
"->SetGridy();\n";
5846 out <<
" " <<
cname <<
"->SetTickx(" <<
GetTickx() <<
");\n";
5848 out <<
" " <<
cname <<
"->SetTicky(" <<
GetTicky() <<
");\n";
5850 out <<
" " <<
cname <<
"->SetTheta(" <<
GetTheta() <<
");\n";
5852 out <<
" " <<
cname <<
"->SetPhi(" <<
GetPhi() <<
");\n";
5884 out <<
" " <<
cname <<
"->SetFrameFillStyle(" << frame->
GetFillStyle() <<
");\n";
5886 out <<
" " <<
cname <<
"->SetFrameLineStyle(" << frame->
GetLineStyle() <<
");\n";
5890 out <<
" " <<
cname <<
"->SetFrameLineWidth(" << frame->
GetLineWidth() <<
");\n";
5899 while (
auto obj = next()) {
5903 out <<
" " << pname <<
"->cd();\n";
5905 out <<
" " <<
cname <<
"->cd();\n";
5908 out <<
" " <<
cname <<
"->Modified();\n";
5921 Error(
"SetAspectRatio",
"cannot fix aspect ratio, height of pad is 0");
5945 while ((obj = next())) {
5959 if (fstyle == 0) fstyle = 4000;
6022 if ((xlow < 0) || (xlow > 1) || (ylow < 0) || (ylow > 1)) {
6023 Error(
"TPad",
"illegal bottom left position: x=%f, y=%f", xlow, ylow);
6026 if ((xup < 0) || (xup > 1) || (yup < 0) || (yup > 1)) {
6027 Error(
"TPad",
"illegal top right position: x=%f, y=%f", xup, yup);
6030 if (xup-xlow <= 0) {
6031 Error(
"TPad",
"illegal width: %f", xup-xlow);
6034 if (yup-ylow <= 0) {
6035 Error(
"TPad",
"illegal height: %f", yup-ylow);
6072 SetPad(xlow, ylow, xup, yup);
6080 if (!view)
delete fView;
6093 pp->SetAttFill({color,
style});
6105 pp->SetAttLine({color,
style, lwidth});
6117 pp->SetAttMarker({color,
style, msize});
6129 if (font % 10 > 2) {
6142 pp->SetAttText({align,
angle, color, font, tsize});
6156 if (aBBox.
fX<bBBox.
fX) {
6172 else if (
mode ==
'y') {
6173 if (aBBox.
fY<bBBox.
fY) {
6241 std::vector<dField> curDist;
6242 std::vector<dField> otherDist;
6252 Int_t dSizeArrow = 12;
6254 movedX = movedY =
false;
6257 if (
mode !=
'i') resize =
true;
6266 static TPad *tmpGuideLinePad =
nullptr;
6269 if (tmpGuideLinePad) {
6271 auto guidePadClicked = (
object == tmpGuideLinePad);
6272 tmpGuideLinePad->
Delete();
6273 tmpGuideLinePad =
nullptr;
6274 if (guidePadClicked)
return;
6278 prims =
gPad->GetListOfPrimitives();
6285 if (!tmpGuideLinePad){
6286 tmpGuideLinePad =
new TPad(
"tmpGuideLinePad",
"tmpGuideLinePad", 0, 0, 1, 1);
6292 tmpGuideLinePad->
Draw();
6293 tmpGuideLinePad->
cd();
6296 if (cling && !log) threshold = 7;
6309 MX =
gPad->GetX1() + 0.5 * (
gPad->GetX2()-
gPad->GetX1());
6310 MY =
gPad->GetY1() + 0.5 * (
gPad->GetY2()-
gPad->GetY1());
6311 pMX =
gPad->XtoPixel(MX);
6312 pMY =
gPad->YtoPixel(MY);
6315 if (cling && (!resize)) {
6323 L->SetLineColor(lineColor);
6327 if (cling && (!resize)) {
6335 L->SetLineColor(lineColor);
6339 for (
UInt_t i = 0; i<
n; i++) {
6345 if (cling && (!resize)) {
6352 L->SetLineColor(lineColor);
6357 if (cling && (!resize)) {
6365 L->SetLineColor(lineColor);
6372 for (
UInt_t i = 0; i<
n; i++) {
6375 aBBox =
a->GetBBox();
6376 for (
UInt_t j = i+1; j<
n; j++) {
6379 bBBox =
b->GetBBox();
6387 if ((
b != cur)&&(
a != cur)) otherDist.push_back(abDist);
6388 else curDist.push_back(abDist);
6395 if ((
b != cur)&&(
a != cur)) otherDist.push_back(abDist);
6396 else curDist.push_back(abDist);
6404 for (
UInt_t i = 0; i<curDist.size(); i++) {
6405 for (
UInt_t j = 0; j<otherDist.size(); j++) {
6406 if ((curDist[i].fdir == otherDist[j].fdir) && (otherDist[j].fdir==
'x') && (
TMath::Abs(curDist[i].fdist-otherDist[j].fdist)<threshold)) {
6407 if (cling && (!movedX) && (!resize)) {
6413 DrawDist(curDist[i].fa->GetBBox(), curDist[i].fb->GetBBox(),
'x');
6414 DrawDist(otherDist[j].fa->GetBBox(), otherDist[j].fb->GetBBox(),
'x');
6416 if ((curDist[i].fdir == otherDist[j].fdir) && (otherDist[j].fdir==
'y') && (
TMath::Abs(curDist[i].fdist-otherDist[j].fdist)<threshold)) {
6417 if (cling && (!movedY) && (!resize)) {
6423 DrawDist(curDist[i].fa->GetBBox(), curDist[i].fb->GetBBox(),
'y');
6424 DrawDist(otherDist[j].fa->GetBBox(), otherDist[j].fb->GetBBox(),
'y');
6427 for (
UInt_t j = i; j<curDist.size(); j++) {
6429 if ((curDist[i].fdir == curDist[j].fdir) && (curDist[j].fdir==
'x') && (
TMath::Abs(curDist[i].fdist-curDist[j].fdist)<threshold)) {
6430 if (cling && (!movedX) && (!resize)) {
6435 DrawDist(curDist[i].fa->GetBBox(), curDist[i].fb->GetBBox(),
'x');
6436 DrawDist(curDist[j].fa->GetBBox(), curDist[j].fb->GetBBox(),
'x');
6439 if ((curDist[i].fdir == curDist[j].fdir) && (curDist[j].fdir==
'y') && (
TMath::Abs(curDist[i].fdist-curDist[j].fdist)<threshold)) {
6440 if (cling && (!movedY) && (!resize)) {
6445 DrawDist(curDist[i].fa->GetBBox(), curDist[i].fb->GetBBox(),
'y');
6446 DrawDist(curDist[j].fa->GetBBox(), curDist[j].fb->GetBBox(),
'y');
6453 for (
UInt_t i = 0; i<
n; i++) {
6455 if (
a && (cur !=
a)) {
6456 aBBox =
a->GetBBox();
6468 gPad->PixeltoX(aBBox.
fX+aBBox.
fWidth),
gPad->PixeltoY(aBBox.
fY-dSizeArrow-
gPad->VtoPixel(0)), 0.01,
"<|>");
6510 if (tmpGuideLinePad) {
6513 tmpGuideLinePad->
Delete();
6514 tmpGuideLinePad =
nullptr;
6600 Int_t nch, nobjects;
6603 if (
b.IsReading()) {
6622 while ((obj = next())) {
6644 b >> single;
fX1 = single;
6645 b >> single;
fY1 = single;
6646 b >> single;
fX2 = single;
6647 b >> single;
fY2 = single;
6654 b >> single;
fX1 = single;
6655 b >> single;
fY1 = single;
6656 b >> single;
fX2 = single;
6657 b >> single;
fY2 = single;
6684 b >> single;
fWNDC = single;
6685 b >> single;
fHNDC = single;
6759 char drawoption[64];
6760 for (
Int_t i = 0; i < nobjects; i++) {
6763 b.ReadFastArray(drawoption,nch);
6785 b >> single;
fPhi = single;
6849 while ((obj = next())) {
6936 if (emode && strlen(emode))
gROOT->SetEditorMode(emode);
6937 if (
gROOT->GetEditorMode() == 0 && pname && strlen(pname) > 2)
gROOT->SetEditorMode(&pname[1]);
6941 TObject *oldlast =
gPad->GetListOfPrimitives() ?
gPad->GetListOfPrimitives()->Last() :
nullptr;
6944 Bool_t hasname = pname && (strlen(pname) > 0);
6945 if ((!pname || !pname[0]) && (!emode || !emode[0])) testlast =
kTRUE;
6946 if (testlast)
gROOT->SetEditorMode();
6948 if (
gROOT->GetEditorMode() == 0) {
6951 if (obj)
return obj;
6954 if (!
gPad->GetListOfPrimitives())
return nullptr;
6955 obj =
gPad->GetListOfPrimitives()->Last();
6956 if (obj != oldlast)
return obj;
6977 if (
gPad->IsBatch())
return nullptr;
7001 (
size_t)tip,(
size_t)
this).Data());
7019 ::Info(
"TPad::x3d()",
"This function is deprecated. Use %s->GetViewer3D(\"x3d\") instead",this->
GetName());
7022 if (!type || !
type[0]) {
7063 if (!strstr(
type,
"pad")) {
7067 Warning(
"GetViewer3D",
"Cannot create 3D viewer of type: %s",
type);
7072 if (strstr(
type,
"gl") && !strstr(
type,
"ogl")) {
7077 createdExternal =
kTRUE;
7095 if (createdExternal) {
7178 p.SetX(
gPad->XtoPixel(
x));
7179 p.SetY(
gPad->YtoPixel(
y));
const Int_t kMaxPixel
Max value for an int.
short Style_t
Style number (short)
int Int_t
Signed integer 4 bytes (int)
short Color_t
Color number (short)
float Size_t
Attribute size (float)
long Longptr_t
Integer large enough to hold a pointer (platform-dependent)
short Version_t
Class version identifier (short)
long Long_t
Signed long integer 4 bytes (long). Size depends on architecture.
short Width_t
Line width (short)
float Float_t
Float 4 bytes (float)
short Short_t
Signed Short integer 2 bytes (short)
double Double_t
Double 8 bytes.
constexpr Ssiz_t kNPOS
The equivalent of std::string::npos for the ROOT class TString.
const char Option_t
Option string (const char)
winID h TVirtualViewer3D TVirtualGLPainter p
winID h TVirtualViewer3D vv
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t mask
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t cursor
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char filename
Option_t Option_t SetFillStyle
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t np
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char cname
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
Option_t Option_t TPoint TPoint const char x2
Option_t Option_t TPoint TPoint const char x1
Option_t Option_t TPoint TPoint angle
Option_t Option_t TPoint TPoint const char mode
Option_t Option_t TPoint TPoint const char y2
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void SetCursor
Option_t Option_t SetFillColor
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t button
Option_t Option_t TPoint TPoint const char text
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char mx
Option_t Option_t TPoint TPoint const char y1
Double_t pixel_boundary(Double_t v)
Check value for valid range for pixel values.
R__EXTERN TPluginManager * gPluginMgr
R__EXTERN TVirtualMutex * gROOTMutex
R__EXTERN TStyle * gStyle
R__EXTERN TSystem * gSystem
#define R__LOCKGUARD(mutex)
R__EXTERN TVirtualPS * gVirtualPS
R__EXTERN Int_t(* gThreadXAR)(const char *xact, Int_t nb, void **ar, Int_t *iret)
Draw all kinds of Arrows.
void Draw(Option_t *option="") override
Draw this arrow with its current attributes.
Abstract base class for elements drawn in the editor.
virtual void SetBBoxCenterY(const Int_t y)=0
virtual void SetBBoxCenterX(const Int_t x)=0
virtual void SetBBoxX1(const Int_t x)=0
virtual void SetBBoxY1(const Int_t y)=0
virtual void SetBBoxX2(const Int_t x)=0
virtual void SetBBoxY2(const Int_t y)=0
virtual Rectangle_t GetBBox()=0
virtual TPoint GetBBoxCenter()
virtual void Streamer(TBuffer &)
virtual Color_t GetFillColor() const
Return the fill area color.
virtual Style_t GetFillStyle() const
Return the fill area style.
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
virtual Bool_t IsTransparent() const
virtual void SetFillStyle(Style_t fstyle)
Set the fill area style.
virtual void SaveFillAttributes(std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1001)
Save fill attributes as C++ statement(s) on output stream out.
virtual void Streamer(TBuffer &)
virtual Color_t GetLineColor() const
Return the line color.
virtual void SetLineStyle(Style_t lstyle)
Set the line style.
virtual Width_t GetLineWidth() const
Return the line width.
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
Width_t fLineWidth
Line width.
virtual void ModifyOn(TVirtualPad &pad)
Change current line attributes on specified pad.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
virtual Style_t GetLineStyle() const
Return the line style.
void Copy(TAttLine &attline) const
Copy this line attributes to a new TAttLine.
virtual void SetBottomMargin(Float_t bottommargin)
Set Pad bottom margin in fraction of the pad height.
Color_t GetFrameFillColor() const
virtual void SetLeftMargin(Float_t leftmargin)
Set Pad left margin in fraction of the pad width.
Color_t GetFrameLineColor() const
Style_t GetFrameLineStyle() const
Float_t fRightMargin
RightMargin.
Style_t GetFrameFillStyle() const
Float_t fLeftMargin
LeftMargin.
Float_t fTopMargin
TopMargin.
Float_t GetLeftMargin() const
Width_t GetFrameLineWidth() const
Float_t GetBottomMargin() const
virtual void SetRightMargin(Float_t rightmargin)
Set Pad right margin in fraction of the pad width.
Float_t GetRightMargin() const
Int_t GetFrameBorderMode() const
virtual void SetTopMargin(Float_t topmargin)
Set Pad top margin in fraction of the pad height.
Width_t GetFrameBorderSize() const
Float_t fBottomMargin
BottomMargin.
Float_t GetTopMargin() const
virtual void Streamer(TBuffer &)
Stream an object of class TAttPad.
virtual Float_t GetTextSize() const
Return the text size.
virtual void SetTextAlign(Short_t align=11)
Set the text alignment.
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 void SetTextAngle(Float_t tangle=0)
Set the text angle.
virtual Float_t GetTextAngle() const
Return the text angle.
virtual void SetTextColor(Color_t tcolor=1)
Set the text color.
virtual void SetTextFont(Font_t tfont=62)
Set the text font.
virtual void SetTextSize(Float_t tsize=1)
Set the text size.
void PaintZoomBox(TPad &pad)
Class to manage histogram axis.
virtual Double_t GetBinLowEdge(Int_t bin) const
Return low edge of bin.
virtual Int_t FindFixBin(Double_t x) const
Find bin number corresponding to abscissa x
Int_t GetLast() const
Return last bin on the axis i.e.
virtual void SetLimits(Double_t xmin, Double_t xmax)
virtual TObject * GetParent() const
virtual void SetRange(Int_t first=0, Int_t last=0)
Set the viewing range for the axis using bin numbers.
virtual Double_t GetBinUpEdge(Int_t bin) const
Return up edge of bin.
Int_t GetFirst() const
Return first bin on the axis i.e.
Each class (see TClass) has a linked list of its base class(es).
TClass * GetClassPointer(Bool_t load=kTRUE)
Get pointer to the base class TClass.
void CalcPixelCoord(const TVirtualPad &parent, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Calculate pixel coordinates.
virtual void SetY2(Double_t y2)
virtual void SetX1(Double_t x1)
virtual void SetX2(Double_t x2)
virtual void SetY1(Double_t y1)
Using a TBrowser one can browse all ROOT objects.
Buffer base class used for serializing objects.
ABC describing GUI independent main window (with menubar, scrollbars and a drawing area).
virtual Int_t RequestLocator(Int_t &x, Int_t &y)
Request current mouse pointer, redirect to gVirtualX.
UInt_t GetWindowHeight() const
TObject * GetClickSelected() const
TVirtualPad * GetClickSelectedPad() const
void SetClickSelectedPad(TPad *pad)
void SetSelectedPad(TPad *pad)
void SetDoubleBuffer(Int_t mode=1) override
Set Double Buffer On/Off.
TCanvasImp * GetCanvasImp() const override
Bool_t IsRetained() const override
Int_t GetEventY() const override
Bool_t IsBatch() const override
TVirtualPadPainter * GetCanvasPainter()
Access and (probably) creation of pad painter.
Color_t GetHighLightColor() const override
Bool_t EnsurePSPainter(Bool_t create, TVirtualPadPainter *&oldp)
Replace canvas painter For internal use only - when creating PS images.
Bool_t IsGrayscale()
Check whether this canvas is to be drawn in grayscale mode.
void SaveSource(const char *filename="", Option_t *option="")
Save primitives in this canvas as a C++ macro file.
virtual void HandleInput(EEventType button, Int_t x, Int_t y)
Handle Input Events.
void UpdateAsync() override
Asynchronous canvas update.
TObject * GetSelected() const override
Int_t GetEventX() const override
void SetCanvasSize(UInt_t ww, UInt_t wh) override
Set Width and Height of canvas to ww and wh respectively.
TVirtualPad * GetSelectedPad() const override
void SetCursor(ECursor cursor) override
Set cursor.
Int_t GetCanvasID() const override
UInt_t GetWindowWidth() const
void SetClickSelected(TObject *obj)
TVirtualPad * GetPadSave() const override
void Update() override
Update canvas pad buffers.
virtual void Cleared(TVirtualPad *pad)
Emit pad Cleared signal.
UInt_t GetWw() const override
Bool_t OpaqueMoving() const override
UInt_t GetWh() const override
void FeedbackMode(Bool_t set) override
Turn rubberband feedback mode on or off.
Int_t GetDoubleBuffer() const override
void SetSelected(TObject *obj) override
Set selected canvas.
Int_t GetEvent() const override
Bool_t IsWeb() const override
Is web canvas.
void SetBatch(Bool_t batch=kTRUE) override
Toggle batch mode.
TVirtualPad * fHilightPadBorder
! pad which border will be hilghlighrt when paint canvas
Bool_t OpaqueResizing() const override
TClass instances represent classes, structs and namespaces in the ROOT type system.
TList * GetListOfMethods(Bool_t load=kTRUE)
Return list containing the TMethods of a class.
Int_t GetNmethods()
Return the number of methods of this class Note that in case the list of methods is not yet created,...
Int_t GetNdata()
Return the number of data members of this class Note that in case the list of data members is not yet...
TList * GetListOfDataMembers(Bool_t load=kTRUE)
Return list containing the TDataMembers of a class.
TList * GetListOfBases()
Return list containing the TBaseClass(es) of a class.
void ls(Option_t *option="") const override
List (ls) all objects in this collection.
void Browse(TBrowser *b) override
Browse this collection (called by TBrowser).
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
static Int_t GetColor(const char *hexcolor)
Static method returning color number for color specified by hex color string of form: "#rrggbb",...
static TString SavePrimitiveColor(Int_t ci)
Convert color in C++ statement which can be used in SetColor directives Produced statement either inc...
static void SetGrayscale(Bool_t set=kTRUE)
Set whether all colors should return grayscale values.
static void ExecuteEvent(TPad &pad, Int_t edit_mode, Int_t event, Int_t px, Int_t py)
Handle edit mode in the TPad Executed when editmode is not 0.
All ROOT classes may have RTTI (run time type identification) support added.
This class stores the date and time with a precision of one second in an unsigned 32 bit word (950130...
const char * AsSQLString() const
Return the date & time in SQL compatible string format, like: 1997-01-15 20:16:28.
const char * AsString() const
Return the date & time as a string (ctime() format).
virtual Int_t GetValue(const char *name, Int_t dflt) const
Returns the integer value for a resource.
TExec is a utility class that can be used to execute a C++ command when some event happens in a pad.
void Paint(Option_t *option="") override
Paint this wbox with its current attributes.
void UseCurrentStyle() override
Replace current frame attributes by current style.
A TGraph is an object made of two arrays X and Y with npoints each.
@ kClipFrame
Clip to the frame boundary.
1-D histogram with a float per channel (see TH1 documentation)
TH1 is the base class of all histogram classes in ROOT.
virtual void SetDirectory(TDirectory *dir)
By default, when a histogram is created, it is added to the list of histogram objects in the current ...
virtual Double_t GetNormFactor() const
virtual Int_t GetDimension() const
@ kNoStats
Don't draw stats box.
@ kIsZoomed
Bit set when zooming on Y axis.
virtual Double_t GetMinimum(Double_t minval=-std::numeric_limits< float >::max()) const
Return minimum value larger than minval of bins in the range, unless the value has been overridden by...
virtual Double_t GetSumOfWeights() const
Return the sum of weights across all bins excluding under/overflows.
virtual void SetMaximum(Double_t maximum=-1111)
void Draw(Option_t *option="") override
Draw this histogram with options.
virtual void SetMinimum(Double_t minimum=-1111)
virtual TH1 * DrawCopy(Option_t *option="", const char *name_postfix="_copy") const
Copy this histogram and Draw in the current pad.
The Histogram stack class.
TH1 * GetHistogram() const
Returns a pointer to the histogram used to draw the axis.
Option_t * GetOption() const
This class displays a legend box (TPaveText) containing several legend entries.
Use the TLine constructor to create a simple line.
Option_t * GetOption() const override
Returns the object option stored in the list.
TObject * After(const TObject *obj) const override
Returns the object after object obj.
void Clear(Option_t *option="") override
Remove all objects from the list.
virtual TObjLink * LastLink() const
TObject * FindObject(const char *name) const override
Find an object in this list using its name.
void RecursiveRemove(TObject *obj) override
Remove object from this collection and recursively remove the object from all other objects (and coll...
void Add(TObject *obj) override
TObject * Remove(TObject *obj) override
Remove object from the list.
void AddLast(TObject *obj) override
Add object at the end of the list.
TObject * Last() const override
Return the last object in the list. Returns 0 when list is empty.
TObject * First() const override
Return the first object in the list. Returns 0 when list is empty.
virtual TObjLink * FirstLink() const
TObject * At(Int_t idx) const override
Returns the object at position idx. Returns 0 if idx is out of range.
void AddFirst(TObject *obj) override
Add object at the beginning of the list.
Each ROOT class (see TClass) has a linked list of methods.
A TMultiGraph is a collection of TGraph (or derived) objects.
TH1F * GetHistogram()
Returns a pointer to the histogram used to draw the axis.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
const char * GetName() const override
Returns name of object.
const char * GetTitle() const override
Returns title of object.
virtual void SetName(const char *name)
Set the name of the TNamed.
Wrapper around a TObject so it can be stored in a TList.
void SetObject(TObject *obj)
TObject * GetObject() const
Mother of all ROOT objects.
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Computes distance from point (px,py) to the object.
virtual const char * GetName() const
Returns name of object.
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
virtual void Streamer(TBuffer &)
Stream an object of class TObject.
virtual const char * ClassName() const
Returns name of class to which the object belongs.
virtual void UseCurrentStyle()
Set current style settings in this object This function is called when either TCanvas::UseCurrentStyl...
virtual Option_t * GetDrawOption() const
Get option used by the graphics system to draw this object.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
virtual TObject * FindObject(const char *name) const
Must be redefined in derived classes.
virtual void Delete(Option_t *option="")
Delete this object.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual const char * GetTitle() const
Returns title of object.
virtual void Draw(Option_t *option="")
Default Draw method for all objects.
virtual void Paint(Option_t *option="")
This method must be overridden if a class wants to paint itself.
@ kCannotPick
if object in a pad cannot be picked
@ kCanDelete
if object in a list can be deleted
@ kMustCleanup
if object destructor must call RecursiveRemove()
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
std::vector< Double_t > fX
void Draw(TPad &pad, TVirtualPadPainter *pp, Bool_t withXor)
std::vector< Double_t > fY
TPadDrawOperation(Int_t n, T *x, T *y, EKind kind, Int_t arg=1, Bool_t ndc=kFALSE)
virtual ~TPadDrawOperation()=default
The most important graphics class in the ROOT system.
Short_t GetBorderMode() const override
Bool_t OpaqueMoving() const override
Is pad moving in opaque mode ?
void PaintTextNDC(Double_t u, Double_t v, const char *text) override
Paint text in CurrentPad NDC coordinates.
Int_t GetTicky() const override
virtual Int_t Clip(Float_t *x, Float_t *y, Float_t xclipl, Float_t yclipb, Float_t xclipr, Float_t yclipt)
Clipping routine: Cohen Sutherland algorithm.
virtual void HideToolTip(Int_t event)
Hide tool tip depending on the event type.
Double_t fAbsYlowNDC
Absolute Y top left corner of pad in NDC [0,1].
std::map< std::string, std::unique_ptr< TPadDrawOperation > > fDrawOper
Double_t fXtoAbsPixelk
Conversion coefficient for X World to absolute pixel.
void SetAttMarkerPS(Color_t color, Style_t style, Size_t msize) override
Set postscript marker attributes.
virtual void DivideSquare(Int_t n, Float_t xmargin=0.01, Float_t ymargin=0.01, Int_t color=0)
"n" is the total number of sub-pads.
void AbsCoordinates(Bool_t set) override
Bool_t IsBatch() const override
Is pad in batch mode ?
Double_t GetUymax() const override
Returns the maximum y-coordinate value visible on the pad. If log axis the returned value is in decad...
void AddExec(const char *name, const char *command) override
Add a new TExec object to the list of Execs.
Double_t fWNDC
Width of pad along X in Normalized Coordinates (NDC)
Int_t NextPaletteColor() override
Get the next autocolor in the pad.
Int_t VtoPixel(Double_t v) const override
Convert Y NDC to pixel.
void PaintBorder(Color_t color, Bool_t tops)
Paint the pad border.
Double_t GetPhi() const override
std::map< std::string, std::unique_ptr< TPadDrawOperation > > fDrawOperXor
! map of draw operations performed outside of normal paint
Bool_t IsEditable() const override
void FillCollideGrid(TObject *o)
Initialise the grid used to find empty space when adding a box (Legend) in a pad.
void SetView(TView *view=nullptr) override
Set the current TView. Delete previous view if view=0.
TVirtualViewer3D * GetViewer3D(Option_t *type="") override
Create/obtain handle to 3D viewer.
Double_t fPixeltoYk
Conversion coefficient for pixel to Y World.
void PaintHatches(Double_t dy, Double_t angle, Int_t nn, Double_t *xx, Double_t *yy)
This routine draw hatches inclined with the angle "angle" and spaced of "dy" in normalized device coo...
void PaintLine3D(Float_t *p1, Float_t *p2) override
Paint 3-D line in the CurrentPad.
static Int_t fgMaxPickDistance
Maximum Pick Distance.
void ResizePad(Option_t *option="") override
Compute pad conversion coefficients.
void PaintMarker3D(Double_t x, Double_t y, Double_t z) override
Paint 3-D marker in the CurrentPad.
void PaintPolyMarker(Int_t n, Float_t *x, Float_t *y, Option_t *option="") override
Paint polymarker in CurrentPad World coordinates.
Double_t fPhi
phi angle to view as lego/surface
Double_t fPixeltoY
yworld = fPixeltoYk + fPixeltoY*ypixel
virtual void RecordLatex(const TObject *obj)
Emit RecordLatex() signal.
Double_t fAbsXlowNDC
Absolute X top left corner of pad in NDC [0,1].
Double_t fVtoPixelk
Conversion coefficient for V NDC to pixel.
Bool_t fGridx
Set to true if grid along X.
TObject * fPadView3D
! 3D View of this TPad
Double_t GetUxmax() const override
Returns the maximum x-coordinate value visible on the pad. If log axis the returned value is in decad...
void Divide(Int_t nx=1, Int_t ny=1, Float_t xmargin=0.01, Float_t ymargin=0.01, Int_t color=0) override
Automatic pad generation by division.
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save primitives in this pad on the C++ source file out.
void CopyBackgroundPixmaps(TPad *stop, Int_t x, Int_t y)
Copy pixmaps of pads laying below pad "stop" into pad "stop".
Double_t fXtoPixel
xpixel = fXtoPixelk + fXtoPixel*xworld
TList * fExecs
List of commands to be executed when a pad event occurs.
Double_t PadtoY(Double_t y) const override
Convert y from pad to Y.
Int_t fTickx
Set to 1 if tick marks along X.
void PaintOperations(Bool_t withXor=kFALSE)
Perform buffered paint operations Used for interactivity functionality immediately after normal paint...
void SetBBoxY1(const Int_t y) override
Set top of BoundingBox to a value (resize in y direction on top)
Int_t fTicky
Set to 1 if tick marks along Y.
Int_t GetPixmapID() const override
Bool_t GetGridx() const override
Double_t fX2
X of upper X coordinate.
Bool_t PlaceBox(TObject *o, Double_t w, Double_t h, Double_t &xl, Double_t &yb, Option_t *option="lb") override
Place a box in NDC space.
void SetLogz(Int_t value=1) override
Set Lin/Log scale for Z.
Int_t UtoAbsPixel(Double_t u) const override
Convert X NDC to absolute pixel.
void Browse(TBrowser *b) override
Browse pad.
Int_t XtoPixel(Double_t x) const override
Convert X coordinate to pixel.
void SetAttFillPS(Color_t color, Style_t style) override
Set postscript fill area attributes.
Int_t fCGnx
! Size of the collide grid along x
void SetBBoxCenterY(const Int_t y) override
Set Y coordinate of the center of the Pad.
Double_t fPixeltoX
xworld = fPixeltoXk + fPixeltoX*xpixel
~TPad() override
Pad destructor.
Double_t fYtoPixel
ypixel = fYtoPixelk + fYtoPixel*yworld
Double_t GetY2() const override
void DeleteToolTip(TObject *tip) override
Delete tool tip object.
void Close(Option_t *option="") override
Delete all primitives in pad and pad itself.
void AbsPixeltoXY(Double_t xpixel, Double_t ypixel, Double_t &x, Double_t &y) override
Convert absolute pixel into X/Y coordinates.
Double_t fAbsWNDC
Absolute Width of pad along X in NDC.
TObject * Remove(TObject *obj, Bool_t modified=kTRUE) override
Remove object from list of primitives When.
UInt_t GetWw() const override
Get canvas width.
void PaintModified() override
Traverse pad hierarchy and (re)paint only modified pads.
void SetEditable(Bool_t mode=kTRUE) override
Set pad editable yes/no If a pad is not editable:
const char * GetTitle() const override
Returns title of object.
void PaintDate()
Paint the current date and time if the option Date is set on via gStyle->SetOptDate() Paint the curre...
static void SetMaxPickDistance(Int_t maxPick=5)
static function to set the maximum Pick Distance fgMaxPickDistance This parameter is used in TPad::Pi...
void PixeltoXY(Double_t xpixel, Double_t ypixel, Double_t &x, Double_t &y) override
Convert pixel to X/Y coordinates.
void SetBBoxX2(const Int_t x) override
Set right hand side of BoundingBox to a value (resize in x direction on right)
void SetBBoxX1(const Int_t x) override
Set lefthandside of BoundingBox to a value (resize in x direction on left)
virtual Int_t ClippingCode(Double_t x, Double_t y, Double_t xcl1, Double_t ycl1, Double_t xcl2, Double_t ycl2)
Compute the endpoint codes for TPad::Clip.
Double_t GetUymin() const override
Returns the minimum y-coordinate value visible on the pad. If log axis the returned value is in decad...
Double_t fX1
X of lower X coordinate.
TList * GetListOfPrimitives() const override
void SetFillStyle(Style_t fstyle) override
Override TAttFill::FillStyle for TPad because we want to handle style=0 as style 4000.
Double_t AbsPixeltoY(Double_t py) override
TH1F * DrawFrame(Double_t xmin, Double_t ymin, Double_t xmax, Double_t ymax, const char *title="") override
Draw an empty pad frame with X and Y axis.
Double_t fVtoPixel
ypixel = fVtoPixelk + fVtoPixel*vndc
TCanvasImp * GetCanvasImp() const override
Get canvas implementation pointer if any.
Int_t GetEvent() const override
Get Event.
Double_t PadtoX(Double_t x) const override
Convert x from pad to X.
TInteractive * Interactive(TObject *obj=nullptr, TInteractive *init=nullptr) override
Internal method to create, provide or delete TInteractive instance It is allowed the only instance of...
virtual void DrawCrosshair()
Function called to draw a crosshair in the canvas.
Double_t YtoPad(Double_t y) const override
Convert y from Y to pad.
virtual void RangeChanged()
Double_t fUymin
Minimum value on the Y axis.
void SetPad(const char *name, const char *title, Double_t xlow, Double_t ylow, Double_t xup, Double_t yup, Color_t color=35, Short_t bordersize=5, Short_t bordermode=-1) override
Set all pad parameters.
void SetCursor(ECursor cursor) override
Set cursor type.
Int_t GetCanvasID() const override
Get canvas identifier.
Int_t fLogz
(=0 if Z linear scale, =1 if log scale)
Int_t HtoAbsPixel(Double_t y1, Double_t y2) const override
Convert a vertical distance [y1,y2] to pixel.
void XYtoPixel(Double_t x, Double_t y, Int_t &xpixel, Int_t &ypixel) const override
Convert X/Y into pixel coordinates - integer.
Double_t fYtoPixelk
Conversion coefficient for Y World to pixel.
void UpdateAsync() override
Asynchronous pad update.
TPad()
Pad default constructor.
void UseCurrentStyle() override
Force a copy of current style for all objects in pad.
static Int_t GetMaxPickDistance()
Static function (see also TPad::SetMaxPickDistance)
Int_t VtoAbsPixel(Double_t v) const override
Convert Y NDC to absolute pixel.
void Range(Double_t x1, Double_t y1, Double_t x2, Double_t y2) override
Set world coordinate system for the pad.
Double_t fUtoPixelk
Conversion coefficient for U NDC to pixel.
void XYtoAbsPixel(Double_t x, Double_t y, Int_t &xpixel, Int_t &ypixel) const override
Convert X/Y into absolute pixel coordinates - integer.
Double_t fPixeltoXk
Conversion coefficient for pixel to X World.
Bool_t IsModified() const override
Double_t fY1
Y of lower Y coordinate.
Int_t GetEventY() const override
Get Y event.
Int_t fGLDevice
! OpenGL off-screen pixmap identifier
Double_t fYlowNDC
Y bottom left corner of pad in NDC [0,1].
TObject * WaitPrimitive(const char *pname="", const char *emode="") override
Loop and sleep until a primitive with name=pname is found in the pad.
void SetAttTextPS(Int_t align, Float_t angle, Color_t color, Style_t font, Float_t tsize) override
Set postscript text attributes.
Bool_t fModified
Set to true when pad is modified.
Double_t PixeltoY(Double_t py) override
Convert pixel to Y coordinate.
TLegend * BuildLegend(Double_t x1=0.3, Double_t y1=0.21, Double_t x2=0.3, Double_t y2=0.21, const char *title="", Option_t *option="") override
Build a legend from the graphical objects in the pad.
virtual TPad * Pick(Int_t px, Int_t py, TObjLink *&pickobj)
Search for an object at pixel position px,py.
void Update() override
Update pad.
virtual void SetNumber(Int_t number)
Int_t fNumber
pad number identifier
void PaintFillAreaNDC(Int_t n, Double_t *x, Double_t *y, Option_t *option="") override
Paint fill area in CurrentPad NDC coordinates.
Double_t fAbsPixeltoXk
Conversion coefficient for absolute pixel to X World.
void Clear(Option_t *option="") override
Delete all pad primitives.
Int_t YtoPixel(Double_t y) const override
Convert Y coordinate to pixel.
Int_t GetTickx() const override
void PaintLine(Double_t x1, Double_t y1, Double_t x2, Double_t y2) override
Paint line in CurrentPad World coordinates.
Int_t GetGLDevice() override
Get GL device.
Double_t fAspectRatio
ratio of w/h in case of fixed ratio
virtual void RecordPave(const TObject *obj)
Emit RecordPave() signal.
void PaintBorderPS(Double_t xl, Double_t yl, Double_t xt, Double_t yt, Int_t bmode, Int_t bsize, Int_t dark, Int_t light) override
Paint a frame border with Postscript - no longer used.
Double_t fUymax
Maximum value on the Y axis.
void SetLogy(Int_t value=1) override
Set Lin/Log scale for Y.
virtual Int_t ClipPolygon(Int_t n, Double_t *x, Double_t *y, Int_t nn, Double_t *xc, Double_t *yc, Double_t xclipl, Double_t yclipb, Double_t xclipr, Double_t yclipt)
Clip polygon using the Sutherland-Hodgman algorithm.
void ExecuteEventAxis(Int_t event, Int_t px, Int_t py, TAxis *axis) override
Execute action corresponding to one event for a TAxis object (called by TAxis::ExecuteEvent....
void HighLight(Color_t col=kRed, Bool_t set=kTRUE) override
Highlight pad.
Double_t AbsPixeltoX(Double_t px) override
void SetBatch(Bool_t batch=kTRUE) override
Set pad in batch mode.
TCanvas * fCanvas
! Pointer to mother canvas
TVirtualPad * GetMother() const override
TVirtualViewer3D * fViewer3D
! Current 3D viewer
virtual void x3d(Option_t *type="")
Deprecated: use TPad::GetViewer3D() instead.
Bool_t HasCrosshair() const override
Return kTRUE if the crosshair has been activated (via SetCrosshair).
Bool_t IsRetained() const override
Is pad retained ?
Bool_t Collide(Int_t i, Int_t j, Int_t w, Int_t h)
Check if a box of size w and h collide some primitives in the pad at position i,j.
Int_t DistancetoPrimitive(Int_t px, Int_t py) override
Compute distance from point px,py to a box.
Bool_t fFixedAspectRatio
True if fixed aspect ratio.
void PaintFillArea(Int_t n, Float_t *x, Float_t *y, Option_t *option="") override
void Modified(Bool_t flag=true) override
Mark pad modified Will be repainted when TCanvas::Update() will be called next time.
void RecursiveRemove(TObject *obj) override
Recursively remove object from a pad and its sub-pads.
void DivideRatios(Int_t nrows, Int_t ncolumns, const std::vector< double > &widthRatios={}, const std::vector< double > &heightRatios={}, const double canvasTopMargin=0., const double canvasLeftMargin=0.)
Divide the canvas according to ratios.
Bool_t HasFixedAspectRatio() const override
void CloseToolTip(TObject *tip) override
Hide tool tip.
Double_t GetUxmin() const override
Returns the minimum x-coordinate value visible on the pad. If log axis the returned value is in decad...
void SetToolTipText(const char *text, Long_t delayms=1000) override
Set tool tip text associated with this pad.
void PaintPolyLine(Int_t n, Float_t *x, Float_t *y, Option_t *option="") override
Paint polyline in CurrentPad World coordinates.
Int_t WtoAbsPixel(Double_t x1, Double_t x2) const override
Convert a horizontal distance [x1,x2] to pixel.
void ls(Option_t *option="") const override
List all primitives in pad.
TView * GetView() const override
void ModifiedUpdate() override
Short cut to call Modified() and Update() in a single call.
Double_t fVtoAbsPixelk
Conversion coefficient for V NDC to absolute pixel.
UInt_t GetPadHeight() const override
Get pad height.
TVirtualPad * GetPadSave() const override
Get save pad.
void SetAttLinePS(Color_t color, Style_t style, Width_t lwidth) override
Set postscript line attributes.
TClass * IsA() const override
TVirtualPad * GetVirtCanvas() const override
Get virtual canvas.
void DeleteExec(const char *name) override
Remove TExec name from the list of Execs.
void PaintSegments(Int_t n, Double_t *x, Double_t *y, Option_t *option="") override
Paint N individual segments Provided arrays should have 2*n elements IMPORTANT! Provided arrays can b...
void FeedbackMode(Bool_t set) override
Switch feedback mode for the canvas Only for internal use when implementing special painters.
UInt_t GetPadWidth() const override
Get pad width.
void Streamer(TBuffer &) override
Stream a class object.
void PaintSegmentsNDC(Int_t n, Double_t *u, Double_t *v) override
Paint N individual segments in NDC coordinates Provided arrays should have 2*n elements IMPORTANT!...
void CopyPixmaps() override
Copy the sub-pixmaps of the pad to the canvas.
void CopyPixmap() override
Copy the pixmap of the pad to the canvas.
Double_t GetY1() const override
Int_t UtoPixel(Double_t u) const override
Convert X NDC to pixel.
TPoint GetBBoxCenter() override
Return the center of the Pad as TPoint in pixels.
void FillCollideGridTFrame(TObject *o)
Bool_t GetGridy() const override
void LineNotFree(Int_t x1, Int_t x2, Int_t y1, Int_t y2)
Mark as "not free" the cells along a line.
Double_t fAbsHNDC
Absolute Height of pad along Y in NDC.
void ExecuteEvent(Int_t event, Int_t px, Int_t py) override
Execute action corresponding to one event.
TObject * fTip
! tool tip associated with box
void SetCanvasSize(UInt_t ww, UInt_t wh) override
Set canvas size.
Int_t GetLogz() const override
virtual void AutoExec()
Execute the list of Execs when a pad event occurs.
Bool_t fAbsCoord
Use absolute coordinates.
Int_t fNumPaletteColor
Number of objects with an automatic color.
Int_t fCrosshairPos
Position of crosshair.
void FillCollideGridTGraph(TObject *o)
void SetFixedAspectRatio(Bool_t fixed=kTRUE) override
Fix pad aspect ratio to current value if fixed is true.
Short_t GetBorderSize() const override
void RedrawAxis(Option_t *option="") override
Redraw the frame axis.
void DrawDist(Rectangle_t aBBox, Rectangle_t bBBox, char mode)
Draw Arrows to indicated equal distances of Objects with given BBoxes.
Int_t fLogx
(=0 if X linear scale, =1 if log scale)
Double_t GetAbsWNDC() const override
Int_t YtoAbsPixel(Double_t y) const override
Convert Y coordinate to absolute pixel.
Double_t fUtoPixel
xpixel = fUtoPixelk + fUtoPixel*undc
Int_t fCrosshair
Crosshair type (0 if no crosshair requested)
void PaintFillAreaHatches(Int_t n, Double_t *x, Double_t *y, Int_t FillStyle)
This function paints hatched fill area according to the FillStyle value The convention for the Hatch ...
void RangeAxis(Double_t xmin, Double_t ymin, Double_t xmax, Double_t ymax) override
Set axis coordinate system for the pad.
@ kCannotMove
Fixed position.
@ kClearAfterCR
Clear after CR.
@ kHori
Pad is horizontal.
@ kPrintingPS
PS Printing.
@ kFraming
Frame is requested.
Double_t fUtoAbsPixelk
Conversion coefficient for U NDC to absolute pixel.
void ResetToolTip(TObject *tip) override
Reset tool tip, i.e.
Double_t GetTheta() const override
TList * fPrimitives
->List of primitives (subpads)
UInt_t GetWh() const override
Get canvas height.
TCanvas * GetCanvas() const override
Short_t fBorderSize
pad bordersize in pixels
void Add(TObject *obj, Option_t *opt="", Bool_t modified=kTRUE) override
Add an object to list of primitives with specified draw option When.
TView * fView
! Pointer to 3-D view (if one exists)
Rectangle_t GetBBox() override
Return the bounding Box of the Pad.
void Paint(Option_t *option="") override
Paint all primitives in pad.
void FillCollideGridTBox(TObject *o)
Double_t fTheta
theta angle to view as lego/surface
void DrawCollideGrid()
This method draws the collide grid on top of the canvas.
void SetVertical(Bool_t vert=kTRUE) override
Set pad vertical (default) or horizontal.
void FillCollideGridTH1(TObject *o)
void GetPadPar(Double_t &xlow, Double_t &ylow, Double_t &xup, Double_t &yup) override
Return lower and upper bounds of the pad in NDC coordinates.
void PaintText(Double_t x, Double_t y, const char *text) override
Paint text in CurrentPad World coordinates.
Int_t fPadPaint
Set to 1 while painting the pad.
static void DrawColorTable()
Static function to Display Color Table in a pad.
Double_t GetXlowNDC() const override
void SaveAs(const char *filename="", Option_t *option="") const override
Save the pad content in a file.
Int_t fPixmapID
! Off-screen pixmap identifier
Bool_t fEditable
True if canvas is editable.
Double_t GetYlowNDC() const override
TObject * FindObject(const char *name) const override
Search if object named name is inside this pad or in pads inside this pad.
Color_t GetHighLightColor() const override
Get highlight color.
Bool_t OpaqueResizing() const override
Is pad resizing in opaque mode ?
std::vector< Bool_t > fCollideGrid
! Grid used to find empty space when adding a box (Legend) in a pad
Int_t IsAnyNeedRepaint() const
Check if pad or any subpads need to be repaint Returns flag with following mask: 1 - some pad is modi...
TVirtualPad * cd(Int_t subpadnumber=0) override
Set Current pad.
Int_t GetLogy() const override
void PaintLineNDC(Double_t u1, Double_t v1, Double_t u2, Double_t v2) override
Paint line in normalized coordinates.
void Print(const char *filename="") const override
This method is equivalent to SaveAs("filename"). See TPad::SaveAs for details.
Int_t GetEventX() const override
Get X event.
TFrame * GetFrame() override
Get frame.
Double_t fYtoAbsPixelk
Conversion coefficient for Y World to absolute pixel.
Double_t fXtoPixelk
Conversion coefficient for X World to pixel.
Int_t fLogy
(=0 if Y linear scale, =1 if log scale)
TFrame * fFrame
! Pointer to 2-D frame (if one exists)
TVirtualPadPainter * GetPainter() override
Get pad painter from TCanvas.
void Draw(Option_t *option="") override
Draw Pad in Current pad (re-parent pad if necessary).
Double_t fHNDC
Height of pad along Y in Normalized Coordinates (NDC)
void ShowGuidelines(TObject *object, const Int_t event, const char mode='i', const bool cling=true) override
Shows lines to indicate if a TAttBBox2D object is aligned to the center or to another object,...
Int_t GetCrosshair() const
Return the crosshair type (from the mother canvas) crosshair type = 0 means no crosshair.
void GetRangeAxis(Double_t &xmin, Double_t &ymin, Double_t &xmax, Double_t &ymax) override
Return pad axis coordinates range.
void SetBorderMode(Short_t bordermode) override
void PaintBox(Double_t x1, Double_t y1, Double_t x2, Double_t y2, Option_t *option="") override
Paint box in CurrentPad World coordinates.
void DrawClassObject(const TObject *obj, Option_t *option="") override
Draw class inheritance tree of the class to which obj belongs.
Int_t fCGny
! Size of the collide grid along y
Double_t fXlowNDC
X bottom left corner of pad in NDC [0,1].
TObject * GetPrimitive(const char *name) const override
Get primitive.
Double_t fUxmin
Minimum value on the X axis.
Double_t GetAbsHNDC() const override
Int_t GetDoubleBuffer() const override
Get doublebuffer mode - 1 by default.
std::unique_ptr< TInteractive > fInteractive
! current interactive object
void SetBBoxCenter(const TPoint &p) override
Set center of the Pad.
Bool_t IsWeb() const override
Is web ?
void SetSelected(TObject *obj) override
Set selected.
TObject * GetSelected() const override
Get selected.
void GetRange(Double_t &x1, Double_t &y1, Double_t &x2, Double_t &y2) override
Return pad world coordinates range.
Double_t PixeltoX(Double_t px) override
Convert pixel to X coordinate.
void PaintPolyLineNDC(Int_t n, Double_t *x, Double_t *y, Option_t *option="") override
Paint polyline in CurrentPad NDC coordinates.
Bool_t IsVertical() const override
void PaintPadFrame(Double_t xmin, Double_t ymin, Double_t xmax, Double_t ymax) override
Paint histogram/graph frame.
Double_t GetAbsYlowNDC() const override
Double_t fUxmax
Maximum value on the X axis.
void AddFirst(TObject *obj, Option_t *opt="", Bool_t modified=kTRUE) override
Add an object as first in list of primitives with specified draw option When.
Double_t fY2
Y of upper Y coordinate.
void PaintTextUrl(Double_t x, Double_t y, const char *text, const char *url) override
Paint text with URL in CurrentPad World coordinates.
Double_t fAbsPixeltoYk
Conversion coefficient for absolute pixel to Y World.
TVirtualPad * GetSelectedPad() const override
Get selected pad.
void PaintPolyLine3D(Int_t n, Double_t *p) override
Paint 3-D polyline in the CurrentPad.
TVirtualPad * GetPad(Int_t subpadnumber) const override
Get a pointer to subpadnumber of this pad.
Short_t fBorderMode
Bordermode (-1=down, 0 = no border, 1=up)
void SetLogx(Int_t value=1) override
Set Lin/Log scale for X.
void ReleaseViewer3D(Option_t *type="") override
Release current (external) viewer.
void SetCrosshair(Int_t crhair=1) override
Set crosshair active/inactive.
void SetDoubleBuffer(Int_t mode=1) override
Set double buffer mode ON or OFF.
Int_t fNextPaletteColor
Next automatic color.
void SetBBoxCenterX(const Int_t x) override
Set X coordinate of the center of the Pad.
Int_t GetLogx() const override
TObject * fPadPointer
! free pointer
Double_t GetX2() const override
TObject * CreateToolTip(const TBox *b, const char *text, Long_t delayms) override
Create a tool tip and return its pointer.
Double_t GetWNDC() const override
Get width of pad along X in Normalized Coordinates (NDC)
void Pop() override
Pop pad to the top of the stack.
Double_t GetAbsXlowNDC() const override
Int_t IncrementPaletteColor(Int_t i, const TString &opt) override
Increment (i==1) or set (i>1) the number of autocolor in the pad.
Double_t GetX1() const override
Double_t GetHNDC() const override
Get height of pad along Y in Normalized Coordinates (NDC)
TPad * fMother
! pointer to mother of the list
const char * GetName() const override
Returns name of object.
Int_t XtoAbsPixel(Double_t x) const override
Convert X coordinate to absolute pixel.
Bool_t fGridy
Set to true if grid along Y.
void SetBBoxY2(const Int_t y) override
Set bottom of BoundingBox to a value (resize in y direction on bottom)
Double_t XtoPad(Double_t x) const override
Convert x from X to pad.
The histogram statistics painter class.
A Pave (see TPave) with text, lines or/and boxes inside.
virtual TText * AddText(Double_t x1, Double_t y1, const char *label)
Add a new Text line to this pavetext at given coordinates.
virtual TLine * AddLine(Double_t x1=0, Double_t y1=0, Double_t x2=0, Double_t y2=0)
Add a new graphics line to this pavetext.
virtual TBox * AddBox(Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Add a new graphics box to this pavetext.
void Draw(Option_t *option="") override
Draw this pavetext with its current attributes.
Int_t GetBorderSize() const
virtual void SetBorderSize(Int_t bordersize=4)
Sets the border size of the TPave box and shadow.
TPluginHandler * FindHandler(const char *base, const char *uri=nullptr)
Returns the handler if there exists a handler for the specified URI.
void Emit(const char *signal, const T &arg)
Activate signal with single parameter.
static Int_t IncreaseDirLevel()
Increase the indentation level for ls().
static void IndentLevel()
Functions used by ls() to indent an object hierarchy.
static Int_t DecreaseDirLevel()
Decrease the indentation level for ls().
void ToLower()
Change string to lower-case.
Bool_t EndsWith(const char *pat, ECaseCompare cmp=kExact) const
Return true if string ends with the specified string.
TString & ReplaceSpecialCppChars()
Find special characters which are typically used in printf() calls and replace them by appropriate es...
TString & Replace(Ssiz_t pos, Ssiz_t n, const char *s)
const char * Data() const
TString & ReplaceAll(const TString &s1, const TString &s2)
void Resize(Ssiz_t n)
Resize the string. Truncate or add blanks as necessary.
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
TString & Prepend(const char *cs)
virtual void Streamer(TBuffer &)
Stream a string object.
TString & Append(const char *cs)
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
void SetPadBorderMode(Int_t mode=1)
void SetPadTopMargin(Float_t margin=0.1)
void SetOptLogx(Int_t logx=1)
void SetPadBottomMargin(Float_t margin=0.1)
Int_t GetOptTitle() const
Int_t GetPadTickX() const
Color_t GetPadColor() const
void SetPadRightMargin(Float_t margin=0.1)
void SetTitleFont(Style_t font=62, Option_t *axis="X")
Float_t GetPadRightMargin() const
void SetTitleBorderSize(Width_t size=2)
Style_t GetTitleFont(Option_t *axis="X") const
Return title font.
void SetPadTickY(Int_t ticky)
Color_t GetTitleFillColor() const
void SetPadTickX(Int_t tickx)
Bool_t GetPadGridY() const
void SetPadGridX(Bool_t gridx)
void SetTitleTextColor(Color_t color=1)
Float_t GetPadLeftMargin() const
Double_t GetHatchesSpacing() const
Bool_t GetPadGridX() const
void SetPadLeftMargin(Float_t margin=0.1)
void SetPadGridY(Bool_t gridy)
void SetOptLogy(Int_t logy=1)
Int_t GetPadTickY() const
Width_t GetPadBorderSize() const
Width_t GetTitleBorderSize() const
Int_t GetColorPalette(Int_t i) const
Return color number i in current palette.
void SetTitleFillColor(Color_t color=1)
Float_t GetPadBottomMargin() const
void SetOptLogz(Int_t logz=1)
void SetPadColor(Color_t color=19)
Color_t GetTitleTextColor() const
Int_t GetPadBorderMode() const
Int_t GetNumberOfColors() const
Return number of colors in the color palette.
void SetPadBorderSize(Width_t size=1)
Int_t GetHatchesLineWidth() const
Float_t GetPadTopMargin() const
virtual Bool_t ExpandPathName(TString &path)
Expand a pathname getting rid of special shell characters like ~.
virtual Int_t Exec(const char *shellcmd)
Execute a command.
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.
virtual int Rename(const char *from, const char *to)
Rename a file.
virtual void Sleep(UInt_t milliSec)
Sleep milliSec milli seconds.
virtual Bool_t ProcessEvents()
Process pending events (GUI, timers, sockets).
Base class for several text objects.
void Paint(Option_t *option="") override
Paint this text with its current attributes.
virtual void SetNDC(Bool_t isNDC=kTRUE)
Set NDC mode on if isNDC = kTRUE, off otherwise.
virtual void WCtoNDC(const Float_t *pw, Float_t *pn)=0
virtual Int_t GetDistancetoAxis(Int_t axis, Int_t px, Int_t py, Double_t &ratio)=0
virtual void ResizePad()=0
virtual void GetRange(Float_t *min, Float_t *max)=0
Provides 3D viewer interface (TVirtualViewer3D) support on a pad.
TVirtualPS is an abstract interface to Postscript, PDF, SVG.
virtual void Open(const char *filename, Int_t type=-111)=0
virtual void DrawFrame(Double_t xl, Double_t yl, Double_t xt, Double_t yt, Int_t mode, Int_t border, Int_t dark, Int_t light)=0
To make it possible to use GL for 2D graphic in a TPad/TCanvas.
virtual void SetAttFill(const TAttFill &att)
Set fill attributes.
virtual void DrawPolyLine(Int_t n, const Double_t *x, const Double_t *y)=0
virtual void DestroyDrawable(Int_t device)=0
virtual void DrawFillArea(Int_t n, const Double_t *x, const Double_t *y)=0
virtual void SetAttLine(const TAttLine &att)
Set line attributes.
virtual void DrawPolyLineNDC(Int_t n, const Double_t *u, const Double_t *v)=0
virtual void SelectDrawable(Int_t device)=0
virtual void InvalidateCS()
Empty definition.
small helper class to store/restore gPad context in TPad methods
void PadDeleted(TVirtualPad *pad)
Inform context that pad deleted or will be deleted soon Reference on that pad should be cleared.
Helper class to store interactive parameters for individual objects Should be used via MakeInteractiv...
void SetObject(TObject *obj)
TVirtualPad is an abstract base class for the Pad and Canvas classes.
virtual Int_t YtoAbsPixel(Double_t y) const =0
virtual Double_t GetX2() const =0
virtual TVirtualPad * cd(Int_t subpadnumber=0)=0
virtual Int_t XtoAbsPixel(Double_t x) const =0
virtual Double_t GetY1() const =0
virtual Int_t GetNumber() const =0
T * GetInteractive(TObject *obj)
void Streamer(TBuffer &) override
Stream an object of class TVirtualPad.
T * MakeInteractive(TObject *obj, Rest &&... rest)
virtual void ShowGuidelines(TObject *object, const Int_t event, const char mode='i', const bool cling=true)=0
virtual void RangeAxisChanged()
virtual Double_t GetY2() const =0
virtual void GetRange(Double_t &x1, Double_t &y1, Double_t &x2, Double_t &y2)=0
Bool_t fResizing
!true when resizing the pad
virtual Bool_t IsEditable() const =0
void FreeInteractive(TObject *obj)
Release interactive instance for specified object.
virtual Double_t GetX1() const =0
Abstract 3D shapes viewer.
virtual Bool_t BuildingScene() const =0
virtual void EndScene()=0
static TVirtualViewer3D * Viewer3D(TVirtualPad *pad=nullptr, Option_t *type="")
Create a Viewer 3D of specified type.
virtual void PadPaint(TVirtualPad *)
virtual void BeginScene()=0
virtual Bool_t CanLoopOnPrimitives() const
A TBox with a bordersize and a bordermode.
Short_t GetBorderSize() const
Short_t GetBorderMode() const
virtual void SetBorderMode(Short_t bordermode)
virtual void SetBorderSize(Short_t bordersize)
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
R__ALWAYS_INLINE bool HasBeenDeleted(const TObject *obj)
Check if the TObject's memory has been deleted.
void CallRecursiveRemoveIfNeeded(TObject &obj)
call RecursiveRemove for obj if gROOT is valid and obj.TestBit(kMustCleanup) is true.
Int_t Nint(T x)
Round to nearest integer. Rounds half integers to the nearest even integer.
Short_t Max(Short_t a, Short_t b)
Returns the largest of a and b.
Double_t Exp(Double_t x)
Returns the base-e exponential function of x, which is e raised to the power x.
Double_t Floor(Double_t x)
Rounds x downward, returning the largest integral value that is not greater than x.
Double_t Ceil(Double_t x)
Rounds x upward, returning the smallest integral value that is not less than x.
Int_t Finite(Double_t x)
Check if it is finite with a mask in order to be consistent in presence of fast math.
Double_t Log(Double_t x)
Returns the natural logarithm of x.
Double_t Sqrt(Double_t x)
Returns the square root of x.
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
Returns x raised to the power y.
Short_t Min(Short_t a, Short_t b)
Returns the smallest of a and b.
Double_t Cos(Double_t)
Returns the cosine of an angle of x radians.
Double_t Sin(Double_t)
Returns the sine of an angle of x radians.
Double_t Log10(Double_t x)
Returns the common (base-10) logarithm of x.
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.
Rectangle structure (maps to the X11 XRectangle structure)
struct used by ShowGuidelines to store the distance Field between objects in the canvas.
dField(TAttBBox2D *a, TAttBBox2D *b, Int_t dist, char direction)