136 fPadPointer =
nullptr;
137 fPrimitives =
nullptr;
152 fPadView3D =
nullptr;
182 fFixedAspectRatio =
kFALSE;
185 fNumPaletteColor = 0;
186 fNextPaletteColor = 0;
200 fUxmin = fUymin = fUxmax = fUymax = 0;
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())) {
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();
677 for (
Int_t i=0;i<2;i++) {
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);
739 for (
Int_t i=0;i<2;i++) {
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++) {
891 x2 = xc2[i];
y2 = yc2[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++) {
918 x2 = xc[i];
y2 = yc[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++) {
943 x2 = xc2[i];
y2 = yc2[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);
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;
1212 for (
Int_t i=0;i<nx;i++) {
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();
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;
1420 if (i >= nkd) { i = 1;
y =
y1 - 0.5*dy;
x += 1/
Double_t(nc); }
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));
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; }
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);
1605 for (
Int_t i=1;i<=nbins;i++) {
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;
2055 Int_t dy = py - pyold;
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) {
2233 event =
gVirtualX->RequestLocator(1, 1, px, py);
2272 static Int_t axisNumber;
2274 static Int_t px1old, py1old, px2old, py2old;
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;
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;
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;
3040 Int_t const cellSize = 10;
3047 for (
int i = 0; i <
fCGnx; i++)
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);
3145 auto attemptPlacement = [&](
Int_t i,
Int_t j) {
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;
3202 for (i=
x1+1; i<
x2; i++) {
3212 for (j=
y1+1; j<
y2; j++) {
3232 for (
int i =
x1; i<=
x2; i++) {
3251 for (i =
x1; i<=
x2; i++) {
3256 for (i =
y1; i<=
y2; i++) {
3274 for (
Int_t i=s; i<
n; i=i+s) {
3276 g->GetPoint(i ,
x2,
y2);
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);
3395 for (
int i = 0; i<
fCGnx; i++) {
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;
3504 TObject *obj = lnk->GetObject();
3514 began3DScene =
kTRUE;
3517 obj->
Paint(lnk->GetOption());
3550 if (color < 0) color = -color;
3557 if (bordersize <= 0) bordersize = 2;
3578 if (px1 < px2) {xl =
fX1; xt =
fX2; }
3579 else {xl =
fX2; xt =
fX1;}
3580 if (py1 > py2) {yl =
fY1; yt =
fY2;}
3581 else {yl =
fY2; yt =
fY1;}
3583 Double_t frameXs[7] = {}, frameYs[7] = {};
3587 frameXs[0] = xl; frameYs[0] = yl;
3588 frameXs[1] = xl + realBsX; frameYs[1] = yl + realBsY;
3589 frameXs[2] = frameXs[1]; frameYs[2] = yt - realBsY;
3590 frameXs[3] = xt - realBsX; frameYs[3] = frameYs[2];
3591 frameXs[4] = xt; frameYs[4] = yt;
3592 frameXs[5] = xl; frameYs[5] = yt;
3593 frameXs[6] = xl; frameYs[6] = yl;
3600 frameXs[0] = xl; frameYs[0] = yl;
3601 frameXs[1] = xl + realBsX; frameYs[1] = yl + realBsY;
3602 frameXs[2] = xt - realBsX; frameYs[2] = frameYs[1];
3603 frameXs[3] = frameXs[2]; frameYs[3] = yt - realBsY;
3604 frameXs[4] = xt; frameYs[4] = yt;
3605 frameXs[5] = xt; frameYs[5] = yl;
3606 frameXs[6] = xl; frameYs[6] = yl;
3712 auto lnk = pList ? pList->
FirstLink() :
nullptr;
3716 ((
TPad*)obj)->PaintModified();
3744 auto lnk = pList ? pList->
FirstLink() :
nullptr;
3747 TObject *obj = lnk->GetObject();
3749 ((
TPad*)obj)->PaintModified();
3761 began3DScene =
kTRUE;
3764 obj->
Paint(lnk->GetOption());
3806 xb[0] =
x1; xb[1] =
x1; xb[2] =
x2; xb[3] =
x2;
3807 yb[0] =
y1; yb[1] =
y2; yb[2] =
y2; yb[3] =
y1;
3859 if (style0 >= 3100 && style0 < 4000) {
3861 xb[0] =
x1; xb[1] =
x1; xb[2] =
x2; xb[3] =
x2;
3862 yb[0] =
y1; yb[1] =
y2; yb[2] =
y2; yb[3] =
y1;
3887 TIter next(start->GetListOfPrimitives());
3888 while ((obj = next())) {
3890 if (obj == stop)
break;
3891 ((
TPad*)obj)->CopyBackgroundPixmap(
x,
y);
3892 ((
TPad*)obj)->CopyBackgroundPixmaps((
TPad*)obj, stop,
x,
y);
3911 Warning(
"TPad::PaintFillArea",
"Float_t signature is obsolete. Use Double_t signature.");
3929 std::vector<Double_t>
x(nc, 0.);
3930 std::vector<Double_t>
y(nc, 0.);
3939 if (fillstyle >= 3100 && fillstyle < 4000) {
3959 std::vector<Double_t> xw(
n), yw(
n);
3960 for (
int i=0; i<
n; i++) {
4002 static Double_t ang1[10] = { 0., 10., 20., 30., 45.,5., 60., 70., 80., 89.99};
4003 static Double_t ang2[10] = {180.,170.,160.,150.,135.,5.,120.,110.,100., 89.99};
4005 Int_t fasi = FillStyle % 1000;
4006 Int_t idSPA = fasi / 100;
4007 Int_t iAng2 = (fasi - 100 * idSPA) / 10;
4008 Int_t iAng1 = fasi % 10;
4011 Int_t lss = 0, lss2 = 0, lcs = 0, lcs2 = 0;
4032 if (ang1[iAng1] != 5.)
PaintHatches(dy, ang1[iAng1], nn, xx, yy);
4033 if (ang2[iAng2] != 5.)
PaintHatches(dy, ang2[iAng2], nn, xx, yy);
4060 const Int_t maxnbi = 100;
4061 Double_t xli[maxnbi], xlh[2], ylh[2], xt1, xt2, yt1, yt2;
4062 Double_t ll,
x,
y,
x1,
x2,
y1,
y2,
a,
b, xi, xip, xin, yi, yip;
4068 ratiox = 1./(rwxmax-rwxmin);
4069 ratioy = 1./(rwymax-rwymin);
4082 gPad->GetPadPar(x1p,y1p,x2p,y2p);
4091 for (i=1; i<=nn; i++) {
4092 x = wndc*ratiox*(xx[i-1]-rwxmin);
4093 y = hndc*ratioy*(yy[i-1]-rwymin);
4094 yrot = sina*
x+cosa*
y;
4100 for (ycur=
ymax; ycur>=
ymin; ycur=ycur-dy) {
4102 for (i=2; i<=nn+1; i++) {
4105 if (i == nn+1) i2=1;
4106 x1 = wndc*ratiox*(xx[i1-1]-rwxmin);
4107 y1 = hndc*ratioy*(yy[i1-1]-rwymin);
4108 x2 = wndc*ratiox*(xx[i2-1]-rwxmin);
4109 y2 = hndc*ratioy*(yy[i2-1]-rwymin);
4110 xt1 = cosa*
x1-sina*
y1;
4111 yt1 = sina*
x1+cosa*
y1;
4112 xt2 = cosa*
x2-sina*
y2;
4113 yt2 = sina*
x2+cosa*
y2;
4124 if ((yi <= ycur) && (ycur < yip)) {
4126 if (nbi >= maxnbi)
return;
4136 if (nbi >= maxnbi)
return;
4139 if (nbi >= maxnbi)
return;
4146 a = (yt1-yt2)/(xt1-xt2);
4147 b = (yt2*xt1-xt2*yt1)/(xt1-xt2);
4156 if ((xi <= xin) && (xin < xip) &&
4160 if (nbi >= maxnbi)
return;
4169 for (i=1; i<=
m; i++) {
4170 if (xli[i] < xli[i-1]) {
4178 if (
inv == 0)
goto L50;
4184 if (nbi%2 != 0)
continue;
4186 for (i=1; i<=nbi; i=i+2) {
4188 xlh[0] = cosb*xli[i-1]-sinb*ycur;
4189 ylh[0] = sinb*xli[i-1]+cosb*ycur;
4190 xlh[1] = cosb*xli[i] -sinb*ycur;
4191 ylh[1] = sinb*xli[i] +cosb*ycur;
4193 xlh[0] = (xlh[0]/wndc)*(rwxmax-rwxmin)+rwxmin;
4194 ylh[0] = (ylh[0]/hndc)*(rwymax-rwymin)+rwymin;
4195 xlh[1] = (xlh[1]/wndc)*(rwxmax-rwxmin)+rwxmin;
4196 ylh[1] = (ylh[1]/hndc)*(rwymax-rwymin)+rwymin;
4197 gPad->PaintLine(xlh[0], ylh[0], xlh[1], ylh[1]);
4256 for (i=0;i<3;i++) temp[i] = p1[i];
4258 for (i=0;i<3;i++) temp[i] = p2[i];
4260 PaintLine(xpad[0],xpad[1],xpad[3],xpad[4]);
4274 for (i=0;i<3;i++) temp[i] = p1[i];
4276 for (i=0;i<3;i++) temp[i] = p2[i];
4278 PaintLine(xpad[0],xpad[1],xpad[3],xpad[4]);
4295 for (i=0; i<
n-1; i++) {
4307 if (iclip == 0 && i <
n-2)
continue;
4344 Int_t i, i1=-1,
np=1, iclip=0;
4346 for (i=0; i <
n-1; i++) {
4360 if (iclip == 0 && i <
n-2)
continue;
4390 std::vector<Double_t> xw(
n), yw(
n);
4391 for (
Int_t i=0; i<
n; i++) {
4408 for (
Int_t i = 1; i <
n; i++)
4427 for (i=0; i<
n; i++) {
4431 if (i <
n-1)
continue;
4433 if (
np == 0)
continue;
4458 for (i=0; i<
n; i++) {
4462 if (i <
n-1)
continue;
4464 if (
np == 0)
continue;
4554 if (!
gPad)
return nullptr;
4561 if (
this !=
gPad->GetCanvas()) {
4570 TPad *pick =
nullptr;
4571 TPad *picked =
this;
4575 pickobj = &dummyLink;