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();
1304 if (!classobj)
return;
1309 TText *ptext =
nullptr;
1312 Int_t nd,nf,nc,nkd,nkf,i,j;
1325 Range(0,0,xpad,ypad);
1330 clevel[nlevel] = obj;
1339 if (nlevel >= maxlev-1)
break;
1343 Int_t ilevel, nelem;
1344 for (ilevel=nlevel;ilevel>=0;ilevel--) {
1345 cl = clevel[ilevel];
1347 if (nelem > maxelem) maxelem = nelem;
1348 nc = (nelem/50) + 1;
1358 if (dx < 1.3) dx = 1.3;
1359 tsizcm = tsizcm - 0.03*
Double_t(ncdraw-5);
1360 if (tsizcm < 0.27) tsizcm = 0.27;
1365 for (ilevel=nlevel;ilevel>=0;ilevel--) {
1366 cl = clevel[ilevel];
1368 if (nelem > maxelem) maxelem = nelem;
1369 nc = (nelem/50) + 1;
1371 if (ilevel < nlevel)
x1 =
x2 + 0.5;
1415 if (i >= nkd) { i = 1;
y =
y1 - 0.5*dy;
x += 1/
Double_t(nc); }
1416 else { i++;
y -= dy; }
1420 Int_t dim =
d->GetArrayDim();
1424 while (indx < dim ){
1425 ldname = strlen(dname);
1426 snprintf(&dname[ldname],256-ldname,
"[%d]",
d->GetMaxIndex(indx));
1447 while ((
m = (
TMethod *) nextm())) {
1449 !strcmp(
m->
GetName(),
"Dictionary" ) ||
1450 !strcmp(
m->
GetName(),
"Class_Version" ) ||
1451 !strcmp(
m->
GetName(),
"DeclFileName" ) ||
1452 !strcmp(
m->
GetName(),
"DeclFileLine" ) ||
1453 !strcmp(
m->
GetName(),
"ImplFileName" ) ||
1454 !strcmp(
m->
GetName(),
"ImplFileLine" )
1457 if (fcount > nf)
break;
1458 if (i >= nkf) { i = 1;
y = ysep - 0.5*dy;
x += 1/
Double_t(nc); }
1459 else { i++;
y -= dy; }
1464 for (j=ilevel-1;j>=0;j--) {
1465 if (cl == clevel[ilevel]) {
1466 if (clevel[j]->GetMethodAny((
char*)
m->
GetName())) {
1513 Int_t pxmin,pxmax,pymin,pymax,px,py;
1527 pxmax = canvas->
GetWw();
1529 pymax = cpad->
GetWh();
1533 if(pxold)
gVirtualX->DrawLine(pxold,pymin,pxold,pymax);
1534 if(pyold)
gVirtualX->DrawLine(pxmin,pyold,pxmax,pyold);
1583 Warning(
"DrawFrame",
"Must be called for the current pad only");
1590 if (hframe)
delete hframe;
1598 std::vector<Double_t> xbins(nbins+1);
1600 for (
Int_t i=1;i<=nbins;i++) {
1603 hframe =
new TH1F(
"hframe",title,nbins,xbins.data());
1626 Double_t xlow, ylow, xup, yup, hs, ws;
1631 gPad->SetFillColor(0);
1636 text.SetTextFont(61);
1637 text.SetTextSize(0.07);
1638 text.SetTextAlign(22);
1645 for (i=0;i<10;i++) {
1652 box.SetFillStyle(1001);
1653 box.SetFillColor(color);
1654 box.DrawBox(xlow, ylow, xup, yup);
1655 box.SetFillStyle(0);
1656 box.SetLineColor(1);
1657 box.DrawBox(xlow, ylow, xup, yup);
1658 if (color == 1)
text.SetTextColor(0);
1659 else text.SetTextColor(1);
1687 const Int_t kMaxDiff = 5;
1688 const Int_t kMinSize = 20;
1689 static Int_t pxorg, pyorg;
1690 static Int_t px1, px2, py1, py2, pxl, pyl, pxt, pyt, pxold, pyold;
1691 static Int_t px1p, px2p, py1p, py2p, pxlp, pylp, pxtp, pytp;
1692 static Bool_t pA, pB, pC, pD, pTop, pL, pR, pBot, pINSIDE;
1715 pA = pB = pC = pD = pTop = pL = pR = pBot = pINSIDE =
kFALSE;
1759 if (newcode)
return;
1826 pA = pB = pC = pD = pTop = pL = pR = pBot = pINSIDE =
kFALSE;
1830 pxold = pxl; pyold = pyl; pA =
kTRUE;
1835 pxold = pxt; pyold = pyl; pB =
kTRUE;
1840 pxold = pxt; pyold = pyt; pC =
kTRUE;
1845 pxold = pxl; pyold = pyt; pD =
kTRUE;
1849 if ((px > pxl+kMaxDiff && px < pxt-kMaxDiff) &&
1851 pxold = pxl; pyold = pyl; pTop =
kTRUE;
1855 if ((px > pxl+kMaxDiff && px < pxt-kMaxDiff) &&
1857 pxold = pxt; pyold = pyt; pBot =
kTRUE;
1861 if ((py > pyl+kMaxDiff && py < pyt-kMaxDiff) &&
1863 pxold = pxl; pyold = pyl; pL =
kTRUE;
1867 if ((py > pyl+kMaxDiff && py < pyt-kMaxDiff) &&
1869 pxold = pxt; pyold = pyt; pR =
kTRUE;
1873 if ((px > pxl+kMaxDiff && px < pxt-kMaxDiff) &&
1874 (py > pyl+kMaxDiff && py < pyt-kMaxDiff)) {
1875 pxold = px; pyold = py; pINSIDE =
kTRUE;
1883 if (pA || pB || pC || pD || pTop || pL || pR || pBot)
1886 if (!pA && !pB && !pC && !pD && !pTop && !pL && !pR && !pBot && !pINSIDE)
1899 if (px > pxt-kMinSize) { px = pxt-kMinSize; wx = px; }
1900 if (py > pyt-kMinSize) { py = pyt-kMinSize; wy = py; }
1901 if (px < pxlp) { px = pxlp; wx = px; }
1902 if (py < pylp) { py = pylp; wy = py; }
1920 if (px < pxl+kMinSize) { px = pxl+kMinSize; wx = px; }
1921 if (py > pyt-kMinSize) { py = pyt-kMinSize; wy = py; }
1922 if (px > pxtp) { px = pxtp; wx = px; }
1923 if (py < pylp) { py = pylp; wy = py; }
1941 if (px < pxl+kMinSize) { px = pxl+kMinSize; wx = px; }
1942 if (py < pyl+kMinSize) { py = pyl+kMinSize; wy = py; }
1943 if (px > pxtp) { px = pxtp; wx = px; }
1944 if (py > pytp) { py = pytp; wy = py; }
1962 if (px > pxt-kMinSize) { px = pxt-kMinSize; wx = px; }
1963 if (py < pyl+kMinSize) { py = pyl+kMinSize; wy = py; }
1964 if (px < pxlp) { px = pxlp; wx = px; }
1965 if (py > pytp) { py = pytp; wy = py; }
1984 if (py2 > py1-kMinSize) { py2 = py1-kMinSize; wy = py2; }
1985 if (py2 < py2p) { py2 = py2p; wy = py2; }
2000 if (py1 < py2+kMinSize) { py1 = py2+kMinSize; wy = py1; }
2001 if (py1 > py1p) { py1 = py1p; wy = py1; }
2016 if (px1 > px2-kMinSize) { px1 = px2-kMinSize; wx = px1; }
2017 if (px1 < px1p) { px1 = px1p; wx = px1; }
2033 if (px2 < px1+kMinSize) { px2 = px1+kMinSize; wx = px2; }
2034 if (px2 > px2p) { px2 = px2p; wx = px2; }
2049 Int_t dx = px - pxold;
2050 Int_t dy = py - pyold;
2051 px1 += dx; py1 += dy; px2 += dx; py2 += dy;
2052 if (px1 < px1p) { dx = px1p - px1; px1 += dx; px2 += dx; wx = px+dx; }
2053 if (px2 > px2p) { dx = px2 - px2p; px1 -= dx; px2 -= dx; wx = px-dx; }
2054 if (py1 > py1p) { dy = py1 - py1p; py1 -= dy; py2 -= dy; wy = py-dy; }
2055 if (py2 < py2p) { dy = py2p - py2; py1 += dy; py2 += dy; wy = py+dy; }
2096 if (pTop || pBot || pL || pR || pINSIDE) {
2103 if (px != pxorg || py != pyorg) {
2127 if (pINSIDE)
gPad->ShowGuidelines(
this,
event);
2128 if (pTop)
gPad->ShowGuidelines(
this,
event,
't',
true);
2129 if (pBot)
gPad->ShowGuidelines(
this,
event,
'b',
true);
2130 if (pL)
gPad->ShowGuidelines(
this,
event,
'l',
true);
2131 if (pR)
gPad->ShowGuidelines(
this,
event,
'r',
true);
2132 if (pA)
gPad->ShowGuidelines(
this,
event,
'1',
true);
2133 if (pB)
gPad->ShowGuidelines(
this,
event,
'2',
true);
2134 if (pC)
gPad->ShowGuidelines(
this,
event,
'3',
true);
2135 if (pD)
gPad->ShowGuidelines(
this,
event,
'4',
true);
2144 if (
gROOT->IsEscaped()) {
2149 if (opaque||ropaque) {
2178 if (pTop || pBot || pL || pR || pINSIDE) {
2185 if (pA || pB || pC || pD || pTop || pL || pR || pBot)
2191 if (px != pxorg || py != pyorg) {
2228 event =
gVirtualX->RequestLocator(1, 1, px, py);
2267 static Int_t axisNumber;
2269 static Int_t px1old, py1old, px2old, py2old;
2273 static std::unique_ptr<TBox> zoombox;
2274 Double_t zbx1=0,zbx2=0,zby1=0,zby2=0;
2281 if (strstr(opt,
"cont4")) {
2290 if (!strcmp(axis->
GetName(),
"xaxis")) {
2294 if (!strcmp(axis->
GetName(),
"yaxis")) {
2298 if (!strcmp(axis->
GetName(),
"zaxis")) {
2304 if (axisNumber == 1) {
2310 }
else if (axisNumber == 2) {
2326 if (axisNumber == 1) {
2331 }
else if (axisNumber == 2) {
2345 zoombox = std::make_unique<TBox>(zbx1, zby1, zbx2, zby2);
2350 zoombox->SetFillColor(ci);
2356 if (!opaque)
gVirtualX->SetLineColor(-1);
2364 if (axisNumber == 1) {
2374 if (axisNumber == 1) {
2379 }
else if (axisNumber == 2) {
2394 zoombox->SetX1(zbx1);
2395 zoombox->SetY1(zby1);
2396 zoombox->SetX2(zbx2);
2397 zoombox->SetY2(zby2);
2430 if (
gROOT->IsEscaped()) {
2432 if (opaque && zoombox)
2439 if (ratio1 > ratio2) {
2444 if (ratio2 - ratio1 > 0.05) {
2446 if (axisNumber == 3 && hobj && hobj->
GetDimension() != 3) {
2455 Float_t newmin = zmin + (zmax-zmin)*ratio1;
2456 Float_t newmax = zmin + (zmax-zmin)*ratio2;
2480 if (axisNumber == 1) {
2488 }
else if (axisNumber == 2) {
2516 xmin = ((
xmin-xmi)/(xma-xmi))*(up-low)+low;
2517 xmax = ((
xmax-xmi)/(xma-xmi))*(up-low)+low;
2520 if (!strcmp(axis->
GetName(),
"xaxis")) axisNumber = 1;
2521 if (!strcmp(axis->
GetName(),
"yaxis")) axisNumber = 2;
2522 if (ratio2 - ratio1 > 0.05) {
2529 if (axisNumber == 1) axis->
SetRange(bin1,bin2);
2530 if (axisNumber == 2 && hobj1) {
2547 while ((obj= next())) {
2550 if (hobj == hobj1)
continue;
2553 if (axisNumber == 1) {
2555 }
else if (axisNumber == 2) {
2599 if (found)
return found;
2601 while (
auto cur = next()) {
2604 if (found)
return found;
2619 if (found)
return found;
2621 while (
auto cur = next()) {
2624 if (found)
return found;
2699 if (
fCanvas ==
this)
return nullptr;
2708 if (
fCanvas ==
this)
return nullptr;
2717 if (
fCanvas ==
this)
return nullptr;
2864 while ((obj=next())) {
2868 if (found)
return found;
2878 if (!subpadnumber) {
2885 while ((obj = next())) {
2888 if (pad->
GetNumber() == subpadnumber)
return pad;
2935 if (color <= 0)
return;
2953 gROOT->SetSelectedPad(
this);
2982 if (opt.
Index(
"pfc")>=0 || opt.
Index(
"plc")>=0 || opt.
Index(
"pmc")>=0) {
3000 if (i>=ncolors) i = ncolors-1;
3012 Int_t const cellSize = 10;
3019 for (
int i = 0; i <
fCGnx; i++)
3020 for (
int j = 0; j <
fCGny; j++)
3026 while(
auto o = iter()) {
3039 while (
auto og = nextgraph())
3043 while (
auto oh = nexthist()) {
3057 for (
int r = i;
r <
w + i;
r++) {
3058 for (
int c = j;
c <
h + j;
c++) {
3093 bool isFirstVertical =
false;
3094 bool isFirstHorizontal =
false;
3096 for (std::size_t i = 0;
option[i] !=
'\0'; ++i) {
3097 char letter = std::tolower(
option[i]);
3098 if (letter ==
'w') {
3103 }
else if (letter ==
't' || letter ==
'b') {
3104 isFirstVertical = !isFirstHorizontal;
3106 dy = letter ==
't' ? -1 : 1;
3107 }
else if (letter ==
'l' || letter ==
'r') {
3108 isFirstHorizontal = !isFirstVertical;
3110 dx = letter ==
'r' ? -1 : 1;
3114 if(dx < 0) std::swap(nxbeg, nxend);
3115 if(dy < 0) std::swap(nybeg, nyend);
3117 auto attemptPlacement = [&](
Int_t i,
Int_t j) {
3127 if(!isFirstVertical) {
3128 for (
Int_t i = nxbeg; i != nxend; i += dx) {
3129 for (
Int_t j = nybeg; j != nyend; j += dy) {
3130 if (attemptPlacement(i, j))
return true;
3135 for (
Int_t j = nybeg; j != nyend; j += dy) {
3136 for (
Int_t i = nxbeg; i != nxend; i += dx) {
3137 if (attemptPlacement(i, j))
return true;
3145#define NotFree(i, j) fCollideGrid[TMath::Max(TMath::Min(i+j*fCGnx,fCGnx*fCGny),0)] = kFALSE;
3174 for (i=
x1+1; i<
x2; i++) {
3184 for (j=
y1+1; j<
y2; j++) {
3204 for (
int i =
x1; i<=
x2; i++) {
3223 for (i =
x1; i<=
x2; i++) {
3228 for (i =
y1; i<=
y2; i++) {
3246 for (
Int_t i=s; i<
n; i=i+s) {
3248 g->GetPoint(i ,
x2,
y2);
3275 if (
name.Index(
"hframe") >= 0)
return;
3280 bool haserrors =
false;
3281 TString drawOption =
h->GetDrawOption();
3285 if (drawOption.
Index(
"hist") < 0) {
3286 if (drawOption.
Index(
"e") >= 0) haserrors =
true;
3289 Int_t nx =
h->GetNbinsX();
3294 for (i = 1; i<nx; i++) {
3296 x1l =
h->GetBinCenter(i);
3302 y1l =
h->GetBinContent(i)-
h->GetBinErrorLow(i);
3308 y2l =
h->GetBinContent(i)+
h->GetBinErrorUp(i);
3314 for (j=
y1; j<=
y2; j++) {
3318 x1l =
h->GetBinLowEdge(i);
3324 y1l =
h->GetBinContent(i);
3331 x1l =
h->GetBinLowEdge(i)+
h->GetBinWidth(i);
3367 for (
int i = 0; i<
fCGnx; i++) {
3370 for (
int j = 0; j<
fCGny; j++) {
3387 box.DrawBox(X1L, Y1L, X2L, Y2L);
3389 box.SetFillColorAlpha(
kRed,t);
3390 box.DrawBox(X1L, Y1L, X2L, Y2L);
3394 if (t==0.15) t = 0.1;
3476 TObject *obj = lnk->GetObject();
3486 began3DScene =
kTRUE;
3489 obj->
Paint(lnk->GetOption());
3522 if (color < 0) color = -color;
3529 if (bordersize <= 0) bordersize = 2;
3550 if (px1 < px2) {xl =
fX1; xt =
fX2; }
3551 else {xl =
fX2; xt =
fX1;}
3552 if (py1 > py2) {yl =
fY1; yt =
fY2;}
3553 else {yl =
fY2; yt =
fY1;}
3555 Double_t frameXs[7] = {}, frameYs[7] = {};
3559 frameXs[0] = xl; frameYs[0] = yl;
3560 frameXs[1] = xl + realBsX; frameYs[1] = yl + realBsY;
3561 frameXs[2] = frameXs[1]; frameYs[2] = yt - realBsY;
3562 frameXs[3] = xt - realBsX; frameYs[3] = frameYs[2];
3563 frameXs[4] = xt; frameYs[4] = yt;
3564 frameXs[5] = xl; frameYs[5] = yt;
3565 frameXs[6] = xl; frameYs[6] = yl;
3572 frameXs[0] = xl; frameYs[0] = yl;
3573 frameXs[1] = xl + realBsX; frameYs[1] = yl + realBsY;
3574 frameXs[2] = xt - realBsX; frameYs[2] = frameYs[1];
3575 frameXs[3] = frameXs[2]; frameYs[3] = yt - realBsY;
3576 frameXs[4] = xt; frameYs[4] = yt;
3577 frameXs[5] = xt; frameYs[5] = yl;
3578 frameXs[6] = xl; frameYs[6] = yl;
3684 auto lnk = pList ? pList->
FirstLink() :
nullptr;
3688 ((
TPad*)obj)->PaintModified();
3716 auto lnk = pList ? pList->
FirstLink() :
nullptr;
3719 TObject *obj = lnk->GetObject();
3721 ((
TPad*)obj)->PaintModified();
3733 began3DScene =
kTRUE;
3736 obj->
Paint(lnk->GetOption());
3778 xb[0] =
x1; xb[1] =
x1; xb[2] =
x2; xb[3] =
x2;
3779 yb[0] =
y1; yb[1] =
y2; yb[2] =
y2; yb[3] =
y1;
3831 if (style0 >= 3100 && style0 < 4000) {
3833 xb[0] =
x1; xb[1] =
x1; xb[2] =
x2; xb[3] =
x2;
3834 yb[0] =
y1; yb[1] =
y2; yb[2] =
y2; yb[3] =
y1;
3860 while ((obj = next())) {
3862 if (obj == stop)
break;
3863 ((
TPad*)obj)->CopyBackgroundPixmap(
x,
y);
3864 ((
TPad*)obj)->CopyBackgroundPixmaps((
TPad*)obj, stop,
x,
y);
3883 Warning(
"TPad::PaintFillArea",
"Float_t signature is obsolete. Use Double_t signature.");
3901 std::vector<Double_t>
x(nc, 0.);
3902 std::vector<Double_t>
y(nc, 0.);
3911 if (fillstyle >= 3100 && fillstyle < 4000) {
3931 std::vector<Double_t> xw(
n), yw(
n);
3932 for (
int i=0; i<
n; i++) {
3974 static Double_t ang1[10] = { 0., 10., 20., 30., 45.,5., 60., 70., 80., 89.99};
3975 static Double_t ang2[10] = {180.,170.,160.,150.,135.,5.,120.,110.,100., 89.99};
3977 Int_t fasi = FillStyle % 1000;
3978 Int_t idSPA = fasi / 100;
3979 Int_t iAng2 = (fasi - 100 * idSPA) / 10;
3980 Int_t iAng1 = fasi % 10;
3983 Int_t lss = 0, lss2 = 0, lcs = 0, lcs2 = 0;
4004 if (ang1[iAng1] != 5.)
PaintHatches(dy, ang1[iAng1], nn, xx, yy);
4005 if (ang2[iAng2] != 5.)
PaintHatches(dy, ang2[iAng2], nn, xx, yy);
4032 const Int_t maxnbi = 100;
4033 Double_t xli[maxnbi], xlh[2], ylh[2], xt1, xt2, yt1, yt2;
4034 Double_t ll,
x,
y,
x1,
x2,
y1,
y2,
a,
b, xi, xip, xin, yi, yip;
4040 ratiox = 1./(rwxmax-rwxmin);
4041 ratioy = 1./(rwymax-rwymin);
4054 gPad->GetPadPar(x1p,y1p,x2p,y2p);
4063 for (i=1; i<=nn; i++) {
4064 x = wndc*ratiox*(xx[i-1]-rwxmin);
4065 y = hndc*ratioy*(yy[i-1]-rwymin);
4066 yrot = sina*
x+cosa*
y;
4072 for (ycur=
ymax; ycur>=
ymin; ycur=ycur-dy) {
4074 for (i=2; i<=nn+1; i++) {
4077 if (i == nn+1) i2=1;
4078 x1 = wndc*ratiox*(xx[i1-1]-rwxmin);
4079 y1 = hndc*ratioy*(yy[i1-1]-rwymin);
4080 x2 = wndc*ratiox*(xx[i2-1]-rwxmin);
4081 y2 = hndc*ratioy*(yy[i2-1]-rwymin);
4082 xt1 = cosa*
x1-sina*
y1;
4083 yt1 = sina*
x1+cosa*
y1;
4084 xt2 = cosa*
x2-sina*
y2;
4085 yt2 = sina*
x2+cosa*
y2;
4096 if ((yi <= ycur) && (ycur < yip)) {
4098 if (nbi >= maxnbi)
return;
4108 if (nbi >= maxnbi)
return;
4111 if (nbi >= maxnbi)
return;
4118 a = (yt1-yt2)/(xt1-xt2);
4119 b = (yt2*xt1-xt2*yt1)/(xt1-xt2);
4128 if ((xi <= xin) && (xin < xip) &&
4132 if (nbi >= maxnbi)
return;
4141 for (i=1; i<=
m; i++) {
4142 if (xli[i] < xli[i-1]) {
4150 if (
inv == 0)
goto L50;
4156 if (nbi%2 != 0)
continue;
4158 for (i=1; i<=nbi; i=i+2) {
4160 xlh[0] = cosb*xli[i-1]-sinb*ycur;
4161 ylh[0] = sinb*xli[i-1]+cosb*ycur;
4162 xlh[1] = cosb*xli[i] -sinb*ycur;
4163 ylh[1] = sinb*xli[i] +cosb*ycur;
4165 xlh[0] = (xlh[0]/wndc)*(rwxmax-rwxmin)+rwxmin;
4166 ylh[0] = (ylh[0]/hndc)*(rwymax-rwymin)+rwymin;
4167 xlh[1] = (xlh[1]/wndc)*(rwxmax-rwxmin)+rwxmin;
4168 ylh[1] = (ylh[1]/hndc)*(rwymax-rwymin)+rwymin;
4169 gPad->PaintLine(xlh[0], ylh[0], xlh[1], ylh[1]);
4228 for (i=0;i<3;i++) temp[i] = p1[i];
4230 for (i=0;i<3;i++) temp[i] = p2[i];
4232 PaintLine(xpad[0],xpad[1],xpad[3],xpad[4]);
4246 for (i=0;i<3;i++) temp[i] = p1[i];
4248 for (i=0;i<3;i++) temp[i] = p2[i];
4250 PaintLine(xpad[0],xpad[1],xpad[3],xpad[4]);
4267 for (i=0; i<
n-1; i++) {
4279 if (iclip == 0 && i <
n-2)
continue;
4316 Int_t i, i1=-1,
np=1, iclip=0;
4318 for (i=0; i <
n-1; i++) {
4332 if (iclip == 0 && i <
n-2)
continue;
4362 std::vector<Double_t> xw(
n), yw(
n);
4363 for (
Int_t i=0; i<
n; i++) {
4380 for (
Int_t i = 1; i <
n; i++)
4399 for (i=0; i<
n; i++) {
4403 if (i <
n-1)
continue;
4405 if (
np == 0)
continue;
4430 for (i=0; i<
n; i++) {
4434 if (i <
n-1)
continue;
4436 if (
np == 0)
continue;
4526 if (!
gPad)
return nullptr;
4533 if (
this !=
gPad->GetCanvas()) {
4542 TPad *pick =
nullptr;
4543 TPad *picked =
this;
4547 pickobj = &dummyLink;
4576 pick = ((
TPad*)obj)->
Pick(px, py, pickobj);
4581 }
else if (!
gROOT->GetEditorMode()) {