249 :
TVirtualPad(
name,title,xlow,ylow,xup,yup,color,bordersize,bordermode)
332 Error(
"TPad",
"You must create a TCanvas before creating a TPad");
341 if ((xlow < 0) || (xlow > 1) || (ylow < 0) || (ylow > 1)) {
342 Error(
"TPad",
"illegal bottom left position: x=%f, y=%f", xlow, ylow);
344 }
else if ((xup < 0) || (xup > 1) || (yup < 0) || (yup > 1)) {
345 Error(
"TPad",
"illegal top right position: x=%f, y=%f", xup, yup);
347 }
else if (xup-xlow <= 0) {
348 Error(
"TPad",
"illegal width: %f", xup-xlow);
350 }
else if (yup-ylow <= 0) {
351 Error(
"TPad",
"illegal height: %f", yup-ylow);
369 SetPad(
name, title, xlow, ylow, xup, yup, color, bordersize, bordermode);
463 while (
auto exec = (
TExec*)next())
506 if (!lop)
return nullptr;
511 while(
auto o = next()) {
516 if (o->InheritsFrom(
TNamed::Class()) && strlen(o->GetTitle()))
518 else if (strlen(o->GetName()))
521 mes = o->ClassName();
533 TIter nextgraph(grlist);
536 while ((obj = nextgraph())) {
538 if (strlen(
gr->GetTitle())) mes =
gr->GetTitle();
539 else if (strlen(
gr->GetName())) mes =
gr->GetName();
540 else mes =
gr->ClassName();
543 leg->AddEntry( obj, mes.
Data(), opt );
548 TIter nexthist(hlist);
549 while (
auto obj = nexthist()) {
556 leg->AddEntry( obj, mes.
Data(), opt );
565 Info(
"BuildLegend",
"No object(s) to build a TLegend.");
608 while (
auto obj = next()) {
611 if (
n == subpadnumber) {
612 return ((
TPad*)obj)->cd();
690 while(code1 + code2) {
701 if (ic == 0) ic = code2;
703 yt =
y[0] + (
y[1]-
y[0])*(xclipl-
x[0])/(
x[1]-
x[0]);
707 yt =
y[0] + (
y[1]-
y[0])*(xclipr-
x[0])/(
x[1]-
x[0]);
711 xt =
x[0] + (
x[1]-
x[0])*(yclipb-
y[0])/(
y[1]-
y[0]);
715 xt =
x[0] + (
x[1]-
x[0])*(yclipt-
y[0])/(
y[1]-
y[0]);
721 code1 =
ClippingCode(xt,yt,xclipl,yclipb,xclipr,yclipt);
725 code2 =
ClippingCode(xt,yt,xclipl,yclipb,xclipr,yclipt);
748 if (
x[0] < xclipl) code1 = code1 | 0x1;
749 if (
x[0] > xclipr) code1 = code1 | 0x2;
750 if (
y[0] < yclipb) code1 = code1 | 0x4;
751 if (
y[0] > yclipt) code1 = code1 | 0x8;
753 if (
x[1] < xclipl) code2 = code2 | 0x1;
754 if (
x[1] > xclipr) code2 = code2 | 0x2;
755 if (
y[1] < yclipb) code2 = code2 | 0x4;
756 if (
y[1] > yclipt) code2 = code2 | 0x8;
760 while(code1 + code2) {
771 if (ic == 0) ic = code2;
773 yt =
y[0] + (
y[1]-
y[0])*(xclipl-
x[0])/(
x[1]-
x[0]);
777 yt =
y[0] + (
y[1]-
y[0])*(xclipr-
x[0])/(
x[1]-
x[0]);
781 xt =
x[0] + (
x[1]-
x[0])*(yclipb-
y[0])/(
y[1]-
y[0]);
785 xt =
x[0] + (
x[1]-
x[0])*(yclipt-
y[0])/(
y[1]-
y[0]);
791 code1 =
ClippingCode(xt,yt,xclipl,yclipb,xclipr,yclipt);
795 code2 =
ClippingCode(xt,yt,xclipl,yclipb,xclipr,yclipt);
808 if (
x < xcl1) code = code | 0x1;
809 if (
x > xcl2) code = code | 0x2;
810 if (
y < ycl1) code = code | 0x4;
811 if (
y > ycl2) code = code | 0x8;
859 std::vector<Double_t> xc2(nn), yc2(nn);
865 for (
i=0;
i<
n;
i++) {
874 xc2[nc2] = xclipl; yc2[nc2++] = slope*(xclipl-
x1)+
y1;
876 xc2[nc2] =
x2; yc2[nc2++] =
y2;
880 xc2[nc2] = xclipl; yc2[nc2++] = slope*(xclipl-
x1)+
y1;
881 xc2[nc2] =
x2; yc2[nc2++] =
y2;
888 x1 = xc2[nc2-1];
y1 = yc2[nc2-1];
890 for (
i=0;
i<nc2;
i++) {
899 xc[nc] =
x1+(yclipt-
y1)*slope; yc[nc++] = yclipt;
901 xc[nc] =
x2; yc[nc++] =
y2;
905 xc[nc] =
x1+(yclipt-
y1)*slope; yc[nc++] = yclipt;
906 xc[nc] =
x2; yc[nc++] =
y2;
915 x1 = xc[nc-1];
y1 = yc[nc-1];
917 for (
i=0;
i<nc;
i++) {
926 xc2[nc2] = xclipr; yc2[nc2++] = slope*(xclipr-
x1)+
y1;
928 xc2[nc2] =
x2; yc2[nc2++] =
y2;
932 xc2[nc2] = xclipr; yc2[nc2++] = slope*(xclipr-
x1)+
y1;
933 xc2[nc2] =
x2; yc2[nc2++] =
y2;
940 x1 = xc2[nc2-1];
y1 = yc2[nc2-1];
942 for (
i=0;
i<nc2;
i++) {
951 xc[nc] =
x1+(yclipb-
y1)*slope; yc[nc++] = yclipb;
953 xc[nc] =
x2; yc[nc++] =
y2;
957 xc[nc] =
x1+(yclipb-
y1)*slope; yc[nc++] = yclipb;
958 xc[nc] =
x2; yc[nc++] =
y2;
1002 if (!
gROOT->GetListOfCanvases())
return;
1004 gROOT->GetListOfCanvases()->Remove(
this);
1010 if (
fMother->GetListOfPrimitives())
1011 fMother->GetListOfPrimitives()->Remove(
this);
1016 if (
fCanvas->GetPadSave() ==
this)
1018 if (
fCanvas->GetSelectedPad() ==
this)
1019 fCanvas->SetSelectedPad(
nullptr);
1020 if (
fCanvas->GetClickSelectedPad() ==
this)
1021 fCanvas->SetClickSelectedPad(
nullptr);
1026 if (
gROOT->GetSelectedPad() ==
this)
1027 gROOT->SetSelectedPad(
nullptr);
1051 while (
auto obj = next()) {
1053 ((
TPad*)obj)->CopyPixmap();
1054 ((
TPad*)obj)->CopyPixmaps();
1080 Int_t pxl, pyl, pxt, pyt;
1085 if (px1 < px2) {pxl = px1; pxt = px2;}
1086 else {pxl = px2; pxt = px1;}
1087 if (py1 < py2) {pyl = py1; pyt = py2;}
1088 else {pyl = py2; pyt = py1;}
1092 if ( (px > pxl && px < pxt) && (
py > pyl &&
py < pyt) ) {
1099 if (
py < pyl) dxl += pyl -
py;
1100 if (
py > pyt) dxl +=
py - pyt;
1102 if (
py < pyl) dxt += pyl -
py;
1103 if (
py > pyt) dxt +=
py - pyt;
1105 if (px < pxl) dyl += pxl - px;
1106 if (px > pxt) dyl += px - pxt;
1108 if (px < pxl) dyt += pxl - px;
1109 if (px > pxt) dyt += px - pxt;
1111 Int_t distance = dxl;
1112 if (dxt < distance) distance = dxt;
1113 if (dyl < distance) distance = dyl;
1114 if (dyt < distance) distance = dyt;
1159 arr[1] =
this; arr[2] = (
void*)&nx;arr[3] = (
void*)& ny;
1160 arr[4] = (
void*)&xmargin; arr[5] = (
void *)& ymargin; arr[6] = (
void *)&color;
1161 if ((*
gThreadXAR)(
"PDCD", 7, arr,
nullptr))
return;
1167 if (nx <= 0) nx = 1;
1168 if (ny <= 0) ny = 1;
1175 if (xmargin > 0 && ymargin > 0) {
1179 for (iy=0;iy<ny;iy++) {
1180 y2 = 1 - iy*dy - ymargin;
1181 y1 =
y2 - dy + 2*ymargin;
1183 if (
y1 >
y2)
continue;
1184 for (ix=0;ix<nx;ix++) {
1185 x1 = ix*dx + xmargin;
1186 x2 =
x1 +dx -2*xmargin;
1187 if (
x1 >
x2)
continue;
1216 if (
i == nx-1)
x2 = 1-xr;
1217 for (
Int_t j=0;j<ny;j++) {
1218 number = j*nx +
i +1;
1221 if (j == 0)
y2 = 1-yt;
1222 if (j == ny-1)
y1 = 0;
1249 Error(
"DivideSquare",
"No canvas associated with this pad.");
1262 Divide(
w,
h, xmargin, ymargin, color);
1272 gROOT->MakeDefCanvas();
1279 if (
fMother->GetListOfPrimitives())
fMother->GetListOfPrimitives()->Remove(
this);
1309 if (!classobj)
return;
1314 TText *ptext =
nullptr;
1317 Int_t nd,nf,nc,nkd,nkf,
i,j;
1330 Range(0,0,xpad,ypad);
1335 clevel[nlevel] = obj;
1344 if (nlevel >= maxlev-1)
break;
1348 Int_t ilevel, nelem;
1349 for (ilevel=nlevel;ilevel>=0;ilevel--) {
1350 cl = clevel[ilevel];
1352 if (nelem > maxelem) maxelem = nelem;
1353 nc = (nelem/50) + 1;
1363 if (dx < 1.3) dx = 1.3;
1364 tsizcm = tsizcm - 0.03*
Double_t(ncdraw-5);
1365 if (tsizcm < 0.27) tsizcm = 0.27;
1370 for (ilevel=nlevel;ilevel>=0;ilevel--) {
1371 cl = clevel[ilevel];
1373 if (nelem > maxelem) maxelem = nelem;
1374 nc = (nelem/50) + 1;
1376 if (ilevel < nlevel)
x1 =
x2 + 0.5;
1400 pt->SetFillColor(19);
1402 pt->SetTextColor(4);
1403 pt->SetTextFont(61);
1404 pt->SetTextAlign(12);
1405 pt->SetTextSize(tsiz);
1407 if (
box)
box->SetFillColor(17);
1421 else {
i++;
y -= dy; }
1425 Int_t dim =
d->GetArrayDim();
1429 while (indx < dim ){
1430 ldname = strlen(dname);
1431 snprintf(&dname[ldname],256-ldname,
"[%d]",
d->GetMaxIndex(indx));
1434 pt->AddText(
x,(
y-
v1)/dv,dname);
1441 pt->AddLine(0,(ysep-
v1)/dv,0,(ysep-
v1)/dv);
1452 while ((
m = (
TMethod *) nextm())) {
1454 !strcmp(
m->GetName(),
"Dictionary" ) ||
1455 !strcmp(
m->GetName(),
"Class_Version" ) ||
1456 !strcmp(
m->GetName(),
"DeclFileName" ) ||
1457 !strcmp(
m->GetName(),
"DeclFileLine" ) ||
1458 !strcmp(
m->GetName(),
"ImplFileName" ) ||
1459 !strcmp(
m->GetName(),
"ImplFileLine" )
1462 if (fcount > nf)
break;
1463 if (
i >= nkf) {
i = 1;
y = ysep - 0.5*dy;
x += 1/
Double_t(nc); }
1464 else {
i++;
y -= dy; }
1466 ptext =
pt->AddText(
x,(
y-
v1)/dv,
m->GetName());
1469 for (j=ilevel-1;j>=0;j--) {
1470 if (cl == clevel[ilevel]) {
1471 if (clevel[j]->GetMethodAny((
char*)
m->GetName())) {
1518 Int_t pxmin,pxmax,pymin,pymax,px,
py;
1532 pxmax = canvas->
GetWw();
1534 pymax = cpad->
GetWh();
1538 if(pxold)
gVirtualX->DrawLine(pxold,pymin,pxold,pymax);
1539 if(pyold)
gVirtualX->DrawLine(pxmin,pyold,pxmax,pyold);
1588 Warning(
"DrawFrame",
"Must be called for the current pad only");
1595 if (hframe)
delete hframe;
1603 std::vector<Double_t> xbins(nbins+1);
1608 hframe =
new TH1F(
"hframe",title,nbins,xbins.data());
1631 Double_t xlow, ylow, xup, yup, hs, ws;
1636 gPad->SetFillColor(0);
1641 text.SetTextFont(61);
1642 text.SetTextSize(0.07);
1643 text.SetTextAlign(22);
1650 for (
i=0;
i<10;
i++) {
1657 box.SetFillStyle(1001);
1658 box.SetFillColor(color);
1659 box.DrawBox(xlow, ylow, xup, yup);
1660 box.SetFillStyle(0);
1661 box.SetLineColor(1);
1662 box.DrawBox(xlow, ylow, xup, yup);
1663 if (color == 1)
text.SetTextColor(0);
1664 else text.SetTextColor(1);
1692 const Int_t kMaxDiff = 5;
1693 const Int_t kMinSize = 20;
1694 static Int_t pxorg, pyorg;
1695 static Int_t px1, px2, py1, py2, pxl, pyl, pxt, pyt, pxold, pyold;
1696 static Int_t px1p, px2p, py1p, py2p, pxlp, pylp, pxtp, pytp;
1697 static Bool_t pA, pB, pC, pD, pTop, pL, pR, pBot, pINSIDE;
1720 pA = pB = pC = pD = pTop = pL = pR = pBot = pINSIDE =
kFALSE;
1764 if (newcode)
return;
1831 pA = pB = pC = pD = pTop = pL = pR = pBot = pINSIDE =
kFALSE;
1835 pxold = pxl; pyold = pyl; pA =
kTRUE;
1840 pxold = pxt; pyold = pyl; pB =
kTRUE;
1845 pxold = pxt; pyold = pyt; pC =
kTRUE;
1850 pxold = pxl; pyold = pyt; pD =
kTRUE;
1854 if ((px > pxl+kMaxDiff && px < pxt-kMaxDiff) &&
1856 pxold = pxl; pyold = pyl; pTop =
kTRUE;
1860 if ((px > pxl+kMaxDiff && px < pxt-kMaxDiff) &&
1862 pxold = pxt; pyold = pyt; pBot =
kTRUE;
1866 if ((
py > pyl+kMaxDiff &&
py < pyt-kMaxDiff) &&
1868 pxold = pxl; pyold = pyl; pL =
kTRUE;
1872 if ((
py > pyl+kMaxDiff &&
py < pyt-kMaxDiff) &&
1874 pxold = pxt; pyold = pyt; pR =
kTRUE;
1878 if ((px > pxl+kMaxDiff && px < pxt-kMaxDiff) &&
1879 (
py > pyl+kMaxDiff &&
py < pyt-kMaxDiff)) {
1880 pxold = px; pyold =
py; pINSIDE =
kTRUE;
1888 if (pA || pB || pC || pD || pTop || pL || pR || pBot)
1891 if (!pA && !pB && !pC && !pD && !pTop && !pL && !pR && !pBot && !pINSIDE)
1904 if (px > pxt-kMinSize) { px = pxt-kMinSize; wx = px; }
1905 if (
py > pyt-kMinSize) {
py = pyt-kMinSize; wy =
py; }
1906 if (px < pxlp) { px = pxlp; wx = px; }
1907 if (
py < pylp) {
py = pylp; wy =
py; }
1925 if (px < pxl+kMinSize) { px = pxl+kMinSize; wx = px; }
1926 if (
py > pyt-kMinSize) {
py = pyt-kMinSize; wy =
py; }
1927 if (px > pxtp) { px = pxtp; wx = px; }
1928 if (
py < pylp) {
py = pylp; wy =
py; }
1946 if (px < pxl+kMinSize) { px = pxl+kMinSize; wx = px; }
1947 if (
py < pyl+kMinSize) {
py = pyl+kMinSize; wy =
py; }
1948 if (px > pxtp) { px = pxtp; wx = px; }
1949 if (
py > pytp) {
py = pytp; wy =
py; }
1967 if (px > pxt-kMinSize) { px = pxt-kMinSize; wx = px; }
1968 if (
py < pyl+kMinSize) {
py = pyl+kMinSize; wy =
py; }
1969 if (px < pxlp) { px = pxlp; wx = px; }
1970 if (
py > pytp) {
py = pytp; wy =
py; }
1989 if (py2 > py1-kMinSize) { py2 = py1-kMinSize; wy = py2; }
1990 if (py2 < py2p) { py2 = py2p; wy = py2; }
2005 if (py1 < py2+kMinSize) { py1 = py2+kMinSize; wy = py1; }
2006 if (py1 > py1p) { py1 = py1p; wy = py1; }
2021 if (px1 > px2-kMinSize) { px1 = px2-kMinSize; wx = px1; }
2022 if (px1 < px1p) { px1 = px1p; wx = px1; }
2038 if (px2 < px1+kMinSize) { px2 = px1+kMinSize; wx = px2; }
2039 if (px2 > px2p) { px2 = px2p; wx = px2; }
2054 Int_t dx = px - pxold;
2056 px1 += dx; py1 += dy; px2 += dx; py2 += dy;
2057 if (px1 < px1p) { dx = px1p - px1; px1 += dx; px2 += dx; wx = px+dx; }
2058 if (px2 > px2p) { dx = px2 - px2p; px1 -= dx; px2 -= dx; wx = px-dx; }
2059 if (py1 > py1p) { dy = py1 - py1p; py1 -= dy; py2 -= dy; wy =
py-dy; }
2060 if (py2 < py2p) { dy = py2p - py2; py1 += dy; py2 += dy; wy =
py+dy; }
2101 if (pTop || pBot || pL || pR || pINSIDE) {
2108 if (px != pxorg ||
py != pyorg) {
2132 if (pINSIDE)
gPad->ShowGuidelines(
this, event);
2133 if (pTop)
gPad->ShowGuidelines(
this, event,
't',
true);
2134 if (pBot)
gPad->ShowGuidelines(
this, event,
'b',
true);
2135 if (pL)
gPad->ShowGuidelines(
this, event,
'l',
true);
2136 if (pR)
gPad->ShowGuidelines(
this, event,
'r',
true);
2137 if (pA)
gPad->ShowGuidelines(
this, event,
'1',
true);
2138 if (pB)
gPad->ShowGuidelines(
this, event,
'2',
true);
2139 if (pC)
gPad->ShowGuidelines(
this, event,
'3',
true);
2140 if (pD)
gPad->ShowGuidelines(
this, event,
'4',
true);
2149 if (
gROOT->IsEscaped()) {
2154 if (opaque||ropaque) {
2183 if (pTop || pBot || pL || pR || pINSIDE) {
2190 if (pA || pB || pC || pD || pTop || pL || pR || pBot)
2196 if (px != pxorg ||
py != pyorg) {
2272 static Int_t axisNumber;
2274 static Int_t px1old, py1old, px2old, py2old;
2275 Int_t nbd, inc, bin1, bin2, first, last;
2278 static std::unique_ptr<TBox> zoombox;
2279 Double_t zbx1=0,zbx2=0,zby1=0,zby2=0;
2286 if (strstr(opt,
"cont4")) {
2295 if (!strcmp(axis->
GetName(),
"xaxis")) {
2299 if (!strcmp(axis->
GetName(),
"yaxis")) {
2303 if (!strcmp(axis->
GetName(),
"zaxis")) {
2309 if (axisNumber == 1) {
2315 }
else if (axisNumber == 2) {
2331 if (axisNumber == 1) {
2336 }
else if (axisNumber == 2) {
2350 zoombox = std::make_unique<TBox>(zbx1, zby1, zbx2, zby2);
2355 zoombox->SetFillColor(ci);
2361 if (!opaque)
gVirtualX->SetLineColor(-1);
2369 if (axisNumber == 1) {
2379 if (axisNumber == 1) {
2384 }
else if (axisNumber == 2) {
2399 zoombox->SetX1(zbx1);
2400 zoombox->SetY1(zby1);
2401 zoombox->SetX2(zbx2);
2402 zoombox->SetY2(zby2);
2439 if (
gROOT->IsEscaped()) {
2441 if (opaque && zoombox)
2448 if (ratio1 > ratio2) {
2453 if (ratio2 - ratio1 > 0.05) {
2455 if (axisNumber == 3 && hobj && hobj->
GetDimension() != 3) {
2464 Float_t newmin = zmin + (zmax-zmin)*ratio1;
2465 Float_t newmax = zmin + (zmax-zmin)*ratio2;
2478 bin1 = first +
Int_t((last-first+1)*ratio1);
2479 bin2 = first +
Int_t((last-first+1)*ratio2);
2489 if (axisNumber == 1) {
2497 }
else if (axisNumber == 2) {
2525 xmin = ((
xmin-xmi)/(xma-xmi))*(up-low)+low;
2526 xmax = ((
xmax-xmi)/(xma-xmi))*(up-low)+low;
2529 if (!strcmp(axis->
GetName(),
"xaxis")) axisNumber = 1;
2530 if (!strcmp(axis->
GetName(),
"yaxis")) axisNumber = 2;
2531 if (ratio2 - ratio1 > 0.05) {
2538 if (axisNumber == 1) axis->
SetRange(bin1,bin2);
2539 if (axisNumber == 2 && hobj1) {
2556 while ((obj= next())) {
2559 if (hobj == hobj1)
continue;
2562 if (axisNumber == 1) {
2564 }
else if (axisNumber == 2) {
2608 if (found)
return found;
2610 while (
auto cur = next()) {
2613 if (found)
return found;
2628 if (found)
return found;
2630 while (
auto cur = next()) {
2633 if (found)
return found;
2708 if (
fCanvas ==
this)
return nullptr;
2717 if (
fCanvas ==
this)
return nullptr;
2726 if (
fCanvas ==
this)
return nullptr;
2869 fFrame->SetFillColor(framecolor);
2892 while ((obj=next())) {
2896 if (found)
return found;
2906 if (!subpadnumber) {
2913 while ((obj = next())) {
2916 if (pad->
GetNumber() == subpadnumber)
return pad;
2963 if (color <= 0)
return;
2981 gROOT->SetSelectedPad(
this);
3010 if (opt.
Index(
"pfc")>=0 || opt.
Index(
"plc")>=0 || opt.
Index(
"pmc")>=0) {
3028 if (
i>=ncolors)
i = ncolors-1;
3032 return gStyle->GetColorPalette(
i);
3040 Int_t const cellSize = 10;
3048 for (
int j = 0; j <
fCGny; j++)
3054 while(
auto o = iter()) {
3067 while (
auto og = nextgraph())
3071 while (
auto oh = nexthist()) {
3085 for (
int r =
i;
r <
w +
i;
r++) {
3086 for (
int c = j;
c <
h + j;
c++) {
3121 bool isFirstVertical =
false;
3122 bool isFirstHorizontal =
false;
3124 for (std::size_t
i = 0;
option[
i] !=
'\0'; ++
i) {
3125 char letter = std::tolower(
option[
i]);
3126 if (letter ==
'w') {
3131 }
else if (letter ==
't' || letter ==
'b') {
3132 isFirstVertical = !isFirstHorizontal;
3134 dy = letter ==
't' ? -1 : 1;
3135 }
else if (letter ==
'l' || letter ==
'r') {
3136 isFirstHorizontal = !isFirstVertical;
3138 dx = letter ==
'r' ? -1 : 1;
3142 if(dx < 0) std::swap(nxbeg, nxend);
3143 if(dy < 0) std::swap(nybeg, nyend);
3155 if(!isFirstVertical) {
3156 for (
Int_t i = nxbeg;
i != nxend;
i += dx) {
3157 for (
Int_t j = nybeg; j != nyend; j += dy) {
3158 if (attemptPlacement(
i, j))
return true;
3163 for (
Int_t j = nybeg; j != nyend; j += dy) {
3164 for (
Int_t i = nxbeg;
i != nxend;
i += dx) {
3165 if (attemptPlacement(
i, j))
return true;
3173#define NotFree(i, j) fCollideGrid[TMath::Max(TMath::Min(i+j*fCGnx,fCGnx*fCGny),0)] = kFALSE;
3212 for (j=
y1+1; j<
y2; j++) {
3232 for (
int i =
x1;
i<=
x2;
i++) {
3303 if (
name.Index(
"hframe") >= 0)
return;
3308 bool haserrors =
false;
3309 TString drawOption =
h->GetDrawOption();
3313 if (drawOption.
Index(
"hist") < 0) {
3314 if (drawOption.
Index(
"e") >= 0) haserrors =
true;
3317 Int_t nx =
h->GetNbinsX();
3322 for (
i = 1;
i<nx;
i++) {
3324 x1l =
h->GetBinCenter(
i);
3330 y1l =
h->GetBinContent(
i)-
h->GetBinErrorLow(
i);
3336 y2l =
h->GetBinContent(
i)+
h->GetBinErrorUp(
i);
3342 for (j=
y1; j<=
y2; j++) {
3346 x1l =
h->GetBinLowEdge(
i);
3352 y1l =
h->GetBinContent(
i);
3359 x1l =
h->GetBinLowEdge(
i)+
h->GetBinWidth(
i);
3384 box.SetFillColorAlpha(
kRed,0.5);
3398 for (
int j = 0; j<
fCGny; j++) {
3415 box.DrawBox(X1L, Y1L, X2L, Y2L);
3417 box.SetFillColorAlpha(
kRed,t);
3418 box.DrawBox(X1L, Y1L, X2L, Y2L);
3422 if (t==0.15) t = 0.1;
3516 TObject *obj = lnk->GetObject();
3526 began3DScene =
kTRUE;
3529 obj->
Paint(lnk->GetOption());
3562 if (color < 0) color = -color;
3569 if (bordersize <= 0) bordersize = 2;
3590 if (px1 < px2) {xl =
fX1; xt =
fX2; }
3591 else {xl =
fX2; xt =
fX1;}
3592 if (py1 > py2) {yl =
fY1; yt =
fY2;}
3593 else {yl =
fY2; yt =
fY1;}
3595 Double_t frameXs[7] = {}, frameYs[7] = {};
3599 frameXs[0] = xl; frameYs[0] = yl;
3600 frameXs[1] = xl + realBsX; frameYs[1] = yl + realBsY;
3601 frameXs[2] = frameXs[1]; frameYs[2] = yt - realBsY;
3602 frameXs[3] = xt - realBsX; frameYs[3] = frameYs[2];
3603 frameXs[4] = xt; frameYs[4] = yt;
3604 frameXs[5] = xl; frameYs[5] = yt;
3605 frameXs[6] = xl; frameYs[6] = yl;
3612 frameXs[0] = xl; frameYs[0] = yl;
3613 frameXs[1] = xl + realBsX; frameYs[1] = yl + realBsY;
3614 frameXs[2] = xt - realBsX; frameYs[2] = frameYs[1];
3615 frameXs[3] = frameXs[2]; frameYs[3] = yt - realBsY;
3616 frameXs[4] = xt; frameYs[4] = yt;
3617 frameXs[5] = xt; frameYs[5] = yl;
3618 frameXs[6] = xl; frameYs[6] = yl;
3647 gVirtualPS->DrawFrame(xl, yl, xt, yt, bmode,bsize,dark,light);
3657 if (
gStyle->GetOptDate()) {
3661 if (
gStyle->GetOptDate() < 10) {
3664 }
else if (
gStyle->GetOptDate() < 20) {
3724 auto lnk = pList ? pList->
FirstLink() :
nullptr;
3726 auto obj = lnk->GetObject();
3728 ((
TPad*)obj)->PaintModified();
3756 auto lnk = pList ? pList->
FirstLink() :
nullptr;
3759 TObject *obj = lnk->GetObject();
3761 ((
TPad*)obj)->PaintModified();
3773 began3DScene =
kTRUE;
3776 obj->
Paint(lnk->GetOption());
3818 xb[0] =
x1; xb[1] =
x1; xb[2] =
x2; xb[3] =
x2;
3819 yb[0] =
y1; yb[1] =
y2; yb[2] =
y2; yb[3] =
y1;
3871 if (style0 >= 3100 && style0 < 4000) {
3873 xb[0] =
x1; xb[1] =
x1; xb[2] =
x2; xb[3] =
x2;
3874 yb[0] =
y1; yb[1] =
y2; yb[2] =
y2; yb[3] =
y1;
3899 TIter next(start->GetListOfPrimitives());
3900 while ((obj = next())) {
3902 if (obj == stop)
break;
3903 ((
TPad*)obj)->CopyBackgroundPixmap(
x,
y);
3904 ((
TPad*)obj)->CopyBackgroundPixmaps((
TPad*)obj, stop,
x,
y);
3923 Warning(
"TPad::PaintFillArea",
"Float_t signature is obsolete. Use Double_t signature.");
3941 std::vector<Double_t>
x(nc, 0.);
3942 std::vector<Double_t>
y(nc, 0.);
3951 if (fillstyle >= 3100 && fillstyle < 4000) {
3971 std::vector<Double_t> xw(
n), yw(
n);
3972 for (
int i=0;
i<
n;
i++) {
4014 static Double_t ang1[10] = { 0., 10., 20., 30., 45.,5., 60., 70., 80., 89.99};
4015 static Double_t ang2[10] = {180.,170.,160.,150.,135.,5.,120.,110.,100., 89.99};
4017 Int_t fasi = FillStyle % 1000;
4018 Int_t idSPA = fasi / 100;
4019 Int_t iAng2 = (fasi - 100 * idSPA) / 10;
4020 Int_t iAng1 = fasi % 10;
4022 Short_t lws = 0, lws2 = 0, lw =
gStyle->GetHatchesLineWidth();
4023 Int_t lss = 0, lss2 = 0, lcs = 0, lcs2 = 0;
4044 if (ang1[iAng1] != 5.)
PaintHatches(dy, ang1[iAng1], nn, xx, yy);
4045 if (ang2[iAng2] != 5.)
PaintHatches(dy, ang2[iAng2], nn, xx, yy);
4072 const Int_t maxnbi = 100;
4073 Double_t xli[maxnbi], xlh[2], ylh[2], xt1, xt2, yt1, yt2;
4074 Double_t ll,
x,
y,
x1,
x2,
y1,
y2,
a,
b, xi, xip, xin, yi, yip;
4080 ratiox = 1./(rwxmax-rwxmin);
4081 ratioy = 1./(rwymax-rwymin);
4094 gPad->GetPadPar(x1p,y1p,x2p,y2p);
4103 for (
i=1;
i<=nn;
i++) {
4104 x = wndc*ratiox*(xx[
i-1]-rwxmin);
4105 y = hndc*ratioy*(yy[
i-1]-rwymin);
4106 yrot = sina*
x+cosa*
y;
4112 for (ycur=
ymax; ycur>=
ymin; ycur=ycur-dy) {
4114 for (
i=2;
i<=nn+1;
i++) {
4117 if (
i == nn+1) i2=1;
4118 x1 = wndc*ratiox*(xx[i1-1]-rwxmin);
4119 y1 = hndc*ratioy*(yy[i1-1]-rwymin);
4120 x2 = wndc*ratiox*(xx[i2-1]-rwxmin);
4121 y2 = hndc*ratioy*(yy[i2-1]-rwymin);
4122 xt1 = cosa*
x1-sina*
y1;
4123 yt1 = sina*
x1+cosa*
y1;
4124 xt2 = cosa*
x2-sina*
y2;
4125 yt2 = sina*
x2+cosa*
y2;
4136 if ((yi <= ycur) && (ycur < yip)) {
4138 if (nbi >= maxnbi)
return;
4148 if (nbi >= maxnbi)
return;
4151 if (nbi >= maxnbi)
return;
4158 a = (yt1-yt2)/(xt1-xt2);
4159 b = (yt2*xt1-xt2*yt1)/(xt1-xt2);
4168 if ((xi <= xin) && (xin < xip) &&
4172 if (nbi >= maxnbi)
return;
4181 for (
i=1;
i<=
m;
i++) {
4182 if (xli[
i] < xli[
i-1]) {
4190 if (
inv == 0)
goto L50;
4196 if (nbi%2 != 0)
continue;
4198 for (
i=1;
i<=nbi;
i=
i+2) {
4200 xlh[0] = cosb*xli[
i-1]-sinb*ycur;
4201 ylh[0] = sinb*xli[
i-1]+cosb*ycur;
4202 xlh[1] = cosb*xli[
i] -sinb*ycur;
4203 ylh[1] = sinb*xli[
i] +cosb*ycur;
4205 xlh[0] = (xlh[0]/wndc)*(rwxmax-rwxmin)+rwxmin;
4206 ylh[0] = (ylh[0]/hndc)*(rwymax-rwymin)+rwymin;
4207 xlh[1] = (xlh[1]/wndc)*(rwxmax-rwxmin)+rwxmin;
4208 ylh[1] = (ylh[1]/hndc)*(rwymax-rwymin)+rwymin;
4209 gPad->PaintLine(xlh[0], ylh[0], xlh[1], ylh[1]);
4268 for (
i=0;
i<3;
i++) temp[
i] = p1[
i];
4269 fView->WCtoNDC(temp, &xpad[0]);
4270 for (
i=0;
i<3;
i++) temp[
i] = p2[
i];
4271 fView->WCtoNDC(temp, &xpad[3]);
4272 PaintLine(xpad[0],xpad[1],xpad[3],xpad[4]);
4286 for (
i=0;
i<3;
i++) temp[
i] = p1[
i];
4287 fView->WCtoNDC(temp, &xpad[0]);
4288 for (
i=0;
i<3;
i++) temp[
i] = p2[
i];
4289 fView->WCtoNDC(temp, &xpad[3]);
4290 PaintLine(xpad[0],xpad[1],xpad[3],xpad[4]);
4307 for (
i=0;
i<
n-1;
i++) {
4319 if (iclip == 0 &&
i <
n-2)
continue;
4358 for (
i=0;
i <
n-1;
i++) {
4372 if (iclip == 0 &&
i <
n-2)
continue;
4402 std::vector<Double_t> xw(
n), yw(
n);
4439 for (
i=0;
i<
n;
i++) {
4443 if (
i <
n-1)
continue;
4445 if (
np == 0)
continue;
4470 for (
i=0;
i<
n;
i++) {
4474 if (
i <
n-1)
continue;
4476 if (
np == 0)
continue;
4566 if (!
gPad)
return nullptr;
4573 if (
this !=
gPad->GetCanvas()) {
4582 TPad *pick =
nullptr;
4583 TPad *picked =
this;
4587 pickobj = &dummyLink;
4621 }
else if (!
gROOT->GetEditorMode()) {
4628 if (dist == 0)
break;
4643 if (
fView && !gotPrim) {
4662 if (!
button->IsEditable()) pickobj =
nullptr;
4667 if (picked ==
this) {
4685 if (
this ==
fMother->GetListOfPrimitives()->Last())
return;
4688 while (
auto obj = next())
4691 fMother->GetListOfPrimitives()->Remove(
this);
4692 fMother->GetListOfPrimitives()->AddLast(
this, opt.
Data());
4713 while (
auto obj = next()) {
4903 const char *opt_default =
"ps";
4920 psname.
Prepend(
gEnv->GetValue(
"Canvas.PrintDirectory",
"."));
4925 if (strstr(opt,
"gif+")) {
4928 }
else if (strstr(opt,
"gif")) {
4931 }
else if (strstr(opt,
"png")) {
4934 }
else if (strstr(opt,
"jpg")) {
4937 }
else if (strstr(opt,
"tiff")) {
4940 }
else if (strstr(opt,
"xpm")) {
4943 }
else if (strstr(opt,
"bmp")) {
4958 if (!
gROOT->IsBatch() && image) {
4961 Color_t hc =
gPad->GetCanvas()->GetHighLightColor();
4962 gPad->GetCanvas()->SetHighLightColor(-1);
4970 Info(
"Print",
"GIF file %s has been created", psname.
Data());
4972 gPad->GetCanvas()->SetHighLightColor(hc);
4976 Color_t hc =
gPad->GetCanvas()->GetHighLightColor();
4977 gPad->GetCanvas()->SetHighLightColor(-1);
4983 if (!
gSystem->AccessPathName(psname)) {
4984 Info(
"Print",
"file %s has been created", psname.
Data());
4986 gPad->GetCanvas()->SetHighLightColor(hc);
4988 Warning(
"Print",
"Unsupported image format %s", psname.
Data());
4994 if (strstr(opt,
"cxx")) {
5000 if (strstr(opt,
"root")) {
5006 if (strstr(opt,
"xml")) {
5013 if (strstr(opt,
"json")) {
5019 if (strstr(opt,
"svg")) {
5032 if (
auto h =
gROOT->GetPluginManager()->FindHandler(
"TVirtualPS",
"svg")) {
5033 if (
h->LoadPlugin() == -1)
5050 if (!
gSystem->AccessPathName(psname))
5051 Info(
"Print",
"SVG file %s has been created", psname.
Data());
5060 if (strstr(opt,
"tex") || strstr(opt,
"Standalone")) {
5073 if (
auto h =
gROOT->GetPluginManager()->FindHandler(
"TVirtualPS",
"tex")) {
5074 if (
h->LoadPlugin() == -1)
5081 if (strstr(opt,
"Standalone")) standalone =
kTRUE;
5086 if (standalone)
gVirtualPS->SetTitle(
"Standalone");
5094 if (!
gSystem->AccessPathName(psname)) {
5096 Info(
"Print",
"Standalone TeX file %s has been created", psname.
Data());
5098 Info(
"Print",
"TeX file %s has been created", psname.
Data());
5117 copen = psname.
EndsWith(
"(");
if (copen) psname[psname.
Length()-1] = 0;
5118 cclose = psname.
EndsWith(
")");
if (cclose) psname[psname.
Length()-1] = 0;
5119 copenb = psname.
EndsWith(
"[");
if (copenb) psname[psname.
Length()-1] = 0;
5120 ccloseb = psname.
EndsWith(
"]");
if (ccloseb) psname[psname.
Length()-1] = 0;
5124 if (copen || copenb) mustClose =
kFALSE;
5125 if (cclose || ccloseb) mustClose =
kTRUE;
5136 if (ratio < 1) pstype = 112;
5137 if (strstr(opt,
"Portrait")) pstype = 111;
5138 if (strstr(opt,
"Landscape")) pstype = 112;
5139 if (strstr(opt,
"eps")) pstype = 113;
5140 if (strstr(opt,
"Preview")) pstype = 113;
5147 const char *pluginName =
"ps";
5148 if (strstr(opt,
"pdf") || strstr(opt,
"Title:") || strstr(opt,
"EmbedFonts"))
5151 pluginName =
"image";
5153 if (
auto h =
gROOT->GetPluginManager()->FindHandler(
"TVirtualPS", pluginName)) {
5154 if (
h->LoadPlugin() == -1)
5163 if (titlePos !=
kNPOS) {
5173 if (!strstr(opt,
"pdf") || image) {
5189 if (!
gSystem->AccessPathName(psname)) {
5190 if (!copen)
Info(
"Print",
"%s file %s has been created", opt.
Data(), psname.
Data());
5191 else Info(
"Print",
"%s file %s has been created using the current canvas", opt.
Data(), psname.
Data());
5200 if (titlePos !=
kNPOS) {
5207 if (cclose)
Info(
"Print",
"Current canvas added to %s file %s and file closed", opt.
Data(), psname.
Data());
5208 else Info(
"Print",
"%s file %s has been closed", opt.
Data(), psname.
Data());
5213 Info(
"Print",
"Current canvas added to %s file %s", opt.
Data(), psname.
Data());
5218 if (strstr(opt,
"Preview"))
5220 if (strstr(opt,
"EmbedFonts")) {
5221 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",
5222 psname.
Data()).Data());
5236 Error(
"Range",
"illegal world coordinates range: x1=%f, y1=%f, x2=%f, y2=%f",
x1,
y1,
x2,
y2);
5274 Error(
"RangeAxis",
"illegal axis coordinates range: xmin=%f, ymin=%f, xmax=%f, ymax=%f",
5294 if (obj ==
fCanvas->GetSelected())
fCanvas->SetSelected(
nullptr);
5295 if (obj ==
fCanvas->GetClickSelected())
fCanvas->SetClickSelected(
nullptr);
5344 TH1 *hobj =
nullptr;
5350 while ((obj = next())) {
5362 if (
g) hobj =
g->GetHistogram();
5379 gPad->GetUxmax(),
gPad->GetUymax());
5381 b->SetLineStyle(
gPad->GetFrameLineStyle());
5382 b->SetLineWidth(
gPad->GetFrameLineWidth());
5383 b->SetLineColor(
gPad->GetFrameLineColor());
5515 Error(
"ResizePad",
"Cannot resize pad. No current pad available.");
5518 if (
gPad->GetWw()==0.0||
gPad->GetWh()==0.0) {
5519 Warning(
"ResizePad",
"gPad has at least one zero dimension.");
5523 Warning(
"ResizePad",
"The pad has at least one zero dimension.");
5528 if (
this ==
gPad->GetCanvas()) {
5536 Warning(
"ResizePad",
"The parent pad has at least one zero dimension.");
5585 while ((obj = next())) {
5591 if (
gPad->IsBatch())
5610 Warning(
"ResizePad",
"Inf/NaN propagated to the pad. Check drawn objects.");
5612 Warning(
"ResizePad",
"%s width changed from %d to %d\n",
GetName(),
w,10);
5616 Warning(
"ResizePad",
"%s height changed from %d to %d\n",
GetName(),
h,10);
5684 psname.
Prepend(
gEnv->GetValue(
"Canvas.PrintDirectory",
"."));
5688 ((
TPad*)
this)->Print(psname,
"gif");
5690 ((
TPad*)
this)->Print(psname,
"gif+");
5692 ((
TPad*)
this)->Print(psname,
"cxx");
5694 ((
TPad*)
this)->Print(psname,
"root");
5696 ((
TPad*)
this)->Print(psname,
"xml");
5698 ((
TPad*)
this)->Print(psname,
"json");
5700 ((
TPad*)
this)->Print(psname,
"eps");
5702 ((
TPad*)
this)->Print(psname,
"pdf");
5704 ((
TPad*)
this)->Print(psname,
"pdf");
5706 ((
TPad*)
this)->Print(psname,
"pdf");
5708 ((
TPad*)
this)->Print(psname,
"pdf");
5710 ((
TPad*)
this)->Print(psname,
"pdf");
5712 ((
TPad*)
this)->Print(psname,
"svg");
5714 ((
TPad*)
this)->Print(psname,
"tex");
5716 ((
TPad*)
this)->Print(psname,
"xpm");
5718 ((
TPad*)
this)->Print(psname,
"png");
5720 ((
TPad*)
this)->Print(psname,
"jpg");
5722 ((
TPad*)
this)->Print(psname,
"jpg");
5724 ((
TPad*)
this)->Print(psname,
"bmp");
5726 ((
TPad*)
this)->Print(psname,
"tiff");
5728 ((
TPad*)
this)->Print(psname,
"ps");
5743 auto p = padName.
Index(
" ");
5748 static Int_t pcounter = 0;
5753 const char *pname = padName.
Data();
5756 if (padName.
Length() == 0) {
5758 if (
this ==
gPad->GetCanvas())
5765 if (
this !=
gPad->GetCanvas()) {
5766 out <<
" "<<std::endl;
5767 out <<
"// ------------>Primitives in pad: "<<
GetName()<<std::endl;
5775 out<<
" "<<
cname<<
"->Draw();"<<std::endl;
5776 out<<
" "<<
cname<<
"->cd();"<<std::endl;
5778 out<<
" "<<
cname<<
"->Range("<<
fX1<<
","<<
fY1<<
","<<
fX2<<
","<<
fY2<<
");"<<std::endl;
5783 static Int_t viewNumber = 0;
5784 out<<
" TView *view"<<++viewNumber<<
" = TView::CreateView(1);"<<std::endl;
5785 out<<
" view"<<viewNumber<<
"->SetRange("<<rmin[0]<<
","<<rmin[1]<<
","<<rmin[2]<<
","
5786 <<rmax[0]<<
","<<rmax[1]<<
","<<rmax[2]<<
");"<<std::endl;
5798 out<<
" "<<
cname<<
"->SetLogx();"<<std::endl;
5801 out<<
" "<<
cname<<
"->SetLogy();"<<std::endl;
5804 out<<
" "<<
cname<<
"->SetLogz();"<<std::endl;
5807 out<<
" "<<
cname<<
"->SetGridx();"<<std::endl;
5810 out<<
" "<<
cname<<
"->SetGridy();"<<std::endl;
5813 out<<
" "<<
cname<<
"->SetTickx("<<
GetTickx()<<
");"<<std::endl;
5816 out<<
" "<<
cname<<
"->SetTicky("<<
GetTicky()<<
");"<<std::endl;
5819 out<<
" "<<
cname<<
"->SetTheta("<<
GetTheta()<<
");"<<std::endl;
5822 out<<
" "<<
cname<<
"->SetPhi("<<
GetPhi()<<
");"<<std::endl;
5839 out<<
" "<<
cname<<
"->SetFrameFillColor(ci);" << std::endl;
5851 out<<
" "<<
cname<<
"->SetFrameLineColor(ci);" << std::endl;
5870 out<<
" "<<
cname<<
"->SetFrameFillColor(ci);" << std::endl;
5872 out<<
" "<<
cname<<
"->SetFrameFillColor("<<frame->
GetFillColor()<<
");"<<std::endl;
5875 out<<
" "<<
cname<<
"->SetFrameFillStyle("<<frame->
GetFillStyle()<<
");"<<std::endl;
5878 out<<
" "<<
cname<<
"->SetFrameLineStyle("<<frame->
GetLineStyle()<<
");"<<std::endl;
5882 out<<
" "<<
cname<<
"->SetFrameLineColor(ci);" << std::endl;
5884 out<<
" "<<
cname<<
"->SetFrameLineColor("<<frame->
GetLineColor()<<
");"<<std::endl;
5887 out<<
" "<<
cname<<
"->SetFrameLineWidth("<<frame->
GetLineWidth()<<
");"<<std::endl;
5900 while (
auto obj = next()) {
5902 if (!strcmp(obj->GetName(),
"Graph"))
5907 out<<
" "<<pname<<
"->cd();"<<std::endl;
5909 out<<
" "<<
cname<<
"->cd();"<<std::endl;
5912 out<<
" "<<
cname<<
"->Modified();"<<std::endl;
5925 Error(
"SetAspectRatio",
"cannot fix aspect ratio, height of pad is 0");
5949 while ((obj = next())) {
5963 if (fstyle == 0) fstyle = 4000;
6026 if ((xlow < 0) || (xlow > 1) || (ylow < 0) || (ylow > 1)) {
6027 Error(
"TPad",
"illegal bottom left position: x=%f, y=%f", xlow, ylow);
6030 if ((xup < 0) || (xup > 1) || (yup < 0) || (yup > 1)) {
6031 Error(
"TPad",
"illegal top right position: x=%f, y=%f", xup, yup);
6034 if (xup-xlow <= 0) {
6035 Error(
"TPad",
"illegal width: %f", xup-xlow);
6038 if (yup-ylow <= 0) {
6039 Error(
"TPad",
"illegal height: %f", yup-ylow);
6076 SetPad(xlow, ylow, xup, yup);
6084 if (!view)
delete fView;
6159 if (aBBox.
fX<bBBox.
fX) {
6175 else if (
mode ==
'y') {
6176 if (aBBox.
fY<bBBox.
fY) {
6242 !
gEnv->GetValue(
"Canvas.ShowGuideLines", 0))
return;
6244 std::vector<dField> curDist;
6245 std::vector<dField> otherDist;
6255 Int_t dSizeArrow = 12;
6257 movedX = movedY =
false;
6260 if (
mode !=
'i') resize =
true;
6269 static TPad *tmpGuideLinePad =
nullptr;
6272 if (tmpGuideLinePad) {
6274 auto guidePadClicked = (
object == tmpGuideLinePad);
6275 tmpGuideLinePad->
Delete();
6276 tmpGuideLinePad =
nullptr;
6277 if (guidePadClicked)
return;
6281 prims =
gPad->GetListOfPrimitives();
6288 if (!tmpGuideLinePad){
6289 tmpGuideLinePad =
new TPad(
"tmpGuideLinePad",
"tmpGuideLinePad", 0, 0, 1, 1);
6295 tmpGuideLinePad->
Draw();
6296 tmpGuideLinePad->
cd();
6299 if (cling && !log) threshold = 7;
6312 MX =
gPad->GetX1() + 0.5 * (
gPad->GetX2()-
gPad->GetX1());
6313 MY =
gPad->GetY1() + 0.5 * (
gPad->GetY2()-
gPad->GetY1());
6314 pMX =
gPad->XtoPixel(MX);
6315 pMY =
gPad->YtoPixel(MY);
6318 if (cling && (!resize)) {
6326 L->SetLineColor(lineColor);
6330 if (cling && (!resize)) {
6338 L->SetLineColor(lineColor);
6348 if (cling && (!resize)) {
6355 L->SetLineColor(lineColor);
6360 if (cling && (!resize)) {
6368 L->SetLineColor(lineColor);
6378 aBBox =
a->GetBBox();
6382 bBBox =
b->GetBBox();
6390 if ((
b != cur)&&(
a != cur)) otherDist.push_back(abDist);
6391 else curDist.push_back(abDist);
6398 if ((
b != cur)&&(
a != cur)) otherDist.push_back(abDist);
6399 else curDist.push_back(abDist);
6407 for (
UInt_t i = 0;
i<curDist.size();
i++) {
6408 for (
UInt_t j = 0; j<otherDist.size(); j++) {
6409 if ((curDist[
i].fdir == otherDist[j].fdir) && (otherDist[j].fdir==
'x') && (
TMath::Abs(curDist[
i].fdist-otherDist[j].fdist)<threshold)) {
6410 if (cling && (!movedX) && (!resize)) {
6416 DrawDist(curDist[
i].fa->GetBBox(), curDist[
i].fb->GetBBox(),
'x');
6417 DrawDist(otherDist[j].fa->GetBBox(), otherDist[j].fb->GetBBox(),
'x');
6419 if ((curDist[
i].fdir == otherDist[j].fdir) && (otherDist[j].fdir==
'y') && (
TMath::Abs(curDist[
i].fdist-otherDist[j].fdist)<threshold)) {
6420 if (cling && (!movedY) && (!resize)) {
6426 DrawDist(curDist[
i].fa->GetBBox(), curDist[
i].fb->GetBBox(),
'y');
6427 DrawDist(otherDist[j].fa->GetBBox(), otherDist[j].fb->GetBBox(),
'y');
6430 for (
UInt_t j =
i; j<curDist.size(); j++) {
6432 if ((curDist[
i].fdir == curDist[j].fdir) && (curDist[j].fdir==
'x') && (
TMath::Abs(curDist[
i].fdist-curDist[j].fdist)<threshold)) {
6433 if (cling && (!movedX) && (!resize)) {
6438 DrawDist(curDist[
i].fa->GetBBox(), curDist[
i].fb->GetBBox(),
'x');
6439 DrawDist(curDist[j].fa->GetBBox(), curDist[j].fb->GetBBox(),
'x');
6442 if ((curDist[
i].fdir == curDist[j].fdir) && (curDist[j].fdir==
'y') && (
TMath::Abs(curDist[
i].fdist-curDist[j].fdist)<threshold)) {
6443 if (cling && (!movedY) && (!resize)) {
6448 DrawDist(curDist[
i].fa->GetBBox(), curDist[
i].fb->GetBBox(),
'y');
6449 DrawDist(curDist[j].fa->GetBBox(), curDist[j].fb->GetBBox(),
'y');
6458 if (
a && (cur !=
a)) {
6459 aBBox =
a->GetBBox();
6471 gPad->PixeltoX(aBBox.
fX+aBBox.
fWidth),
gPad->PixeltoY(aBBox.
fY-dSizeArrow-
gPad->VtoPixel(0)), 0.01,
"<|>");
6513 if (tmpGuideLinePad) {
6516 tmpGuideLinePad->
Delete();
6517 tmpGuideLinePad =
nullptr;
6603 Int_t nch, nobjects;
6606 if (
b.IsReading()) {
6625 while ((obj = next())) {
6647 b >> single;
fX1 = single;
6648 b >> single;
fY1 = single;
6649 b >> single;
fX2 = single;
6650 b >> single;
fY2 = single;
6657 b >> single;
fX1 = single;
6658 b >> single;
fY1 = single;
6659 b >> single;
fX2 = single;
6660 b >> single;
fY2 = single;
6687 b >> single;
fWNDC = single;
6688 b >> single;
fHNDC = single;
6762 char drawoption[64];
6763 for (
Int_t i = 0;
i < nobjects;
i++) {
6766 b.ReadFastArray(drawoption,nch);
6788 b >> single;
fPhi = single;
6816 if (
gStyle->IsReading()) {
6852 while ((obj = next())) {
6858 if (
gStyle->IsReading()) {
6863 if (!
gStyle->GetOptTitle())
delete title;
6939 if (emode && strlen(emode))
gROOT->SetEditorMode(emode);
6940 if (
gROOT->GetEditorMode() == 0 && pname && strlen(pname) > 2)
gROOT->SetEditorMode(&pname[1]);
6944 TObject *oldlast =
gPad->GetListOfPrimitives() ?
gPad->GetListOfPrimitives()->Last() :
nullptr;
6947 Bool_t hasname = pname && (strlen(pname) > 0);
6948 if (!pname[0] && !emode[0]) testlast =
kTRUE;
6949 if (testlast)
gROOT->SetEditorMode();
6951 if (
gROOT->GetEditorMode() == 0) {
6954 if (obj)
return obj;
6957 if (!
gPad->GetListOfPrimitives())
return nullptr;
6958 obj =
gPad->GetListOfPrimitives()->Last();
6959 if (obj != oldlast)
return obj;
6980 if (
gPad->IsBatch())
return nullptr;
7004 (
size_t)tip,(
size_t)
this).Data());
7022 ::Info(
"TPad::x3d()",
"This function is deprecated. Use %s->GetViewer3D(\"x3d\") instead",this->
GetName());
7025 if (!type || !
type[0]) {
7066 if (!strstr(
type,
"pad")) {
7070 Warning(
"GetViewer3D",
"Cannot create 3D viewer of type: %s",
type);
7075 if (strstr(
type,
"gl") && !strstr(
type,
"ogl")) {
7080 createdExternal =
kTRUE;
7098 if (createdExternal) {
7152 return fCanvas->GetCanvasPainter();
const Int_t kMaxPixel
Max value for an int.
if(isa< VarDecl >(D)||isa< FieldDecl >(D)||isa< EnumConstantDecl >(D))
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 w
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize wid
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 y1
static Bool_t ContainsTImage(TList *li)
Auxiliary function.
R__EXTERN TPluginManager * gPluginMgr
externTVirtualMutex * 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()=0
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 Modify()
Change current fill area attributes if necessary.
Style_t fFillStyle
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 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 SetLineColor(Color_t lcolor)
Set the line color.
virtual Style_t GetLineStyle() const
Return the line style.
virtual void Modify()
Change current line attributes if necessary.
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 void SetTextAlign(Short_t align=11)
Set 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 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.
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.
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).
static Bool_t SupportAlpha()
Static function returning "true" if transparency is supported.
void SaveSource(const char *filename="", Option_t *option="")
Save primitives in this canvas as a C++ macro file.
Int_t GetCanvasID() const override
void FeedbackMode(Bool_t set)
Turn rubberband feedback mode on or off.
UInt_t GetWw() const override
void SetBatch(Bool_t batch=kTRUE) override
Toggle batch mode.
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.
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
The color creation and management class.
static Bool_t SaveColor(std::ostream &out, Int_t ci)
Save a color with index > 228 as a C++ statement(s) on output stream out.
static Int_t GetColor(const char *hexcolor)
Static method returning color number for color specified by hex color string of form: "#rrggbb",...
static Int_t GetColorBright(Int_t color)
Static function: Returns the bright color number corresponding to n If the TColor object does not exi...
static Int_t GetColorDark(Int_t color)
Static function: Returns the dark color number corresponding to n If the TColor object does not exist...
virtual void SetAlpha(Float_t a)
static void SetGrayscale(Bool_t set=kTRUE)
Set whether all colors should return grayscale values.
static void Pave(Int_t event, Int_t px, Int_t py, Int_t mode)
Create a new pavetext in gPad.
static void Line(Int_t event, Int_t px, Int_t py, Int_t mode)
Create a new line/arrow in this gPad.
static void PolyLine(Int_t event, Int_t px, Int_t py, Int_t mode)
Create a new PolyLine in gPad.
static void Text(Int_t event, Int_t px, Int_t py, Int_t mode)
Create a new TLatex at the cursor position in gPad.
static void Ellipse(Int_t event, Int_t px, Int_t py, Int_t mode)
Create a new arc/ellipse in this gPad.
static void Pad(Int_t event, Int_t px, Int_t py, Int_t)
Create a new pad in gPad.
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).
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.
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 GetMaximum(Double_t maxval=FLT_MAX) const
Return maximum value smaller than maxval of bins in the range, unless the value has been overridden b...
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.
virtual Int_t GetMaximumBin() const
Return location of bin with maximum value in the range.
virtual Double_t GetBinContent(Int_t bin) const
Return content of bin number bin.
virtual Int_t GetMinimumBin() const
Return location of bin with minimum value in the range.
virtual Double_t GetMinimum(Double_t minval=-FLT_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 excluding under/overflows.
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.
virtual TObjLink * LastLink() const
TObject * FindObject(const char *name) const override
Find an object in this list using its name.
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.
const char * GetName() const override
Returns name of object.
const char * GetTitle() const override
Returns title of object.
Wrapper around a TObject so it can be stored in a TList.
void SetObject(TObject *obj)
TObject * GetObject() const
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 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.
TObject()
TObject constructor.
@ 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.
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].
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
Double_t AbsPixeltoY(Int_t py) 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
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 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
void CopyBackgroundPixmaps(TPad *start, TPad *stop, Int_t x, Int_t y)
Copy pixmaps of pads laying below pad "stop" into pad "stop".
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.
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 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
virtual void XYtoAbsPixel(Double_t x, Double_t y, Int_t &xpixel, Int_t &ypixel) const
Convert X/Y into absolute pixel coordinates.
TPad(const TPad &pad)=delete
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
void CopyBackgroundPixmap(Int_t x, Int_t y)
Copy pixmap of this pad as background of the current pad.
~TPad() override
Pad destructor.
Double_t fYtoPixel
ypixel = fYtoPixelk + fYtoPixel*yworld
void DeleteToolTip(TObject *tip) override
Delete tool tip object.
void Close(Option_t *option="") override
Delete all primitives in pad and pad itself.
Double_t fAbsWNDC
Absolute Width of pad along X in NDC.
UInt_t GetWw() const override
Get Ww.
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 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.
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.
virtual void PixeltoXY(Int_t xpixel, Int_t ypixel, Double_t &x, Double_t &y)
Convert pixel to X/Y coordinates.
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)
Double_t fYtoPixelk
Conversion coefficient for Y World to pixel.
void UpdateAsync() override
Asynchronous pad update.
TPad()
Pad default constructor.
Double_t AbsPixeltoX(Int_t px) override
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.
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.
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 PixeltoX(Int_t px) override
Convert pixel to X coordinate.
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.
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.
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.
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.
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.
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 Streamer(TBuffer &) override
Stream a class object.
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.
virtual void AbsPixeltoXY(Int_t xpixel, Int_t ypixel, Double_t &x, Double_t &y)
Convert absolute pixel into X/Y coordinates.
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 XYtoPixel(Double_t x, Double_t y, Int_t &xpixel, Int_t &ypixel) const
Convert X/Y into pixel coordinates.
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.
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 Wh.
TCanvas * GetCanvas() const override
Short_t fBorderSize
pad bordersize in pixels
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.
@ kCannotMove
Fixed position.
@ kClearAfterCR
Clear after CR.
@ kHori
Pad is horizontal.
@ kPrintingPS
PS Printing.
@ kFraming
Frame is requested.
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
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.
Double_t PixeltoY(Int_t py) override
Convert pixel to Y coordinate.
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
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.
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
Int_t IncrementPaletteColor(Int_t i, TString opt) override
Increment (i==1) or set (i>1) the number of autocolor in the pad.
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.
Double_t fY2
Y of upper Y coordinate.
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
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.
Int_t GetBorderSize() const
virtual void SetBorderSize(Int_t bordersize=4)
Sets the border size of the TPave box and shadow.
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 & 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)
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
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 Int_t GetDistancetoAxis(Int_t axis, Int_t px, Int_t py, Double_t &ratio)=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.
To make it possible to use GL for 2D graphic in a TPad/TCanvas.
virtual void DrawBox(Double_t x1, Double_t y1, Double_t x2, Double_t y2, EBoxMode mode)=0
virtual void ClearDrawable()=0
virtual void SetOpacity(Int_t percent)=0
virtual void DrawPolyLine(Int_t n, const Double_t *x, const Double_t *y)=0
virtual Color_t GetLineColor() const =0
virtual void SetLineStyle(Style_t lstyle)=0
virtual void SetFillColor(Color_t fcolor)=0
virtual void DestroyDrawable(Int_t device)=0
virtual void CopyDrawable(Int_t device, Int_t px, Int_t py)=0
virtual void DrawLine(Double_t x1, Double_t y1, Double_t x2, Double_t y2)=0
virtual void DrawFillArea(Int_t n, const Double_t *x, const Double_t *y)=0
virtual Int_t CreateDrawable(UInt_t w, UInt_t h)=0
virtual void SetLineColor(Color_t lcolor)=0
virtual Style_t GetLineStyle() const =0
virtual void SaveImage(TVirtualPad *pad, const char *fileName, Int_t type) const =0
virtual void DrawLineNDC(Double_t u1, Double_t v1, Double_t u2, Double_t v2)=0
virtual void SetFillStyle(Style_t fstyle)=0
virtual void SetTextSize(Float_t tsize=1)=0
virtual void SetLineWidth(Width_t lwidth)=0
virtual void DrawPolyLineNDC(Int_t n, const Double_t *u, const Double_t *v)=0
virtual void DrawTextNDC(Double_t u, Double_t v, const char *text, ETextMode mode)=0
virtual Width_t GetLineWidth() const =0
virtual void SelectDrawable(Int_t device)=0
virtual void DrawPolyMarker(Int_t n, const Double_t *x, const Double_t *y)=0
virtual void DrawText(Double_t x, Double_t y, const char *text, ETextMode mode)=0
virtual Style_t GetFillStyle() const =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.
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
void Streamer(TBuffer &) override
Stream an object of class TVirtualPad.
virtual Int_t VtoPixel(Double_t v) const =0
TVirtualPad()
VirtualPad default constructor.
virtual Int_t VtoAbsPixel(Double_t v) const =0
virtual void RangeAxisChanged()
virtual Double_t GetY2() const =0
virtual Int_t UtoPixel(Double_t u) const =0
virtual Short_t GetBorderSize() const =0
virtual Bool_t IsEditable() const =0
virtual Double_t GetX1() const =0
Abstract 3D shapes viewer.
static TVirtualViewer3D * Viewer3D(TVirtualPad *pad=nullptr, Option_t *type="")
Create a Viewer 3D of specified type.
Short_t GetBorderSize() const
Short_t GetBorderMode() const
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.
void inv(rsa_NUMBER *, rsa_NUMBER *, rsa_NUMBER *)
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)