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);
516 while (
auto exec = (
TExec*)next())
559 if (!lop)
return nullptr;
560 TList *lof =
nullptr;
567 auto AddEntryFromListOfFunctions = [&]() {
569 while ((obj = nextobj())) {
578 leg->AddEntry(obj, mes.
Data(),
"lpf");
582 while(
auto o = next()) {
588 if (o->InheritsFrom(
TNamed::Class()) && strlen(o->GetTitle()))
590 else if (strlen(o->GetName()))
593 mes = o->ClassName();
606 lof = ((
TH1 *)o)->GetListOfFunctions();
607 AddEntryFromListOfFunctions();
610 lof = ((
TGraph *)o)->GetListOfFunctions();
611 AddEntryFromListOfFunctions();
617 TIter nextgraph(grlist);
619 while ((obj = nextgraph())) {
631 leg->AddEntry(obj, mes.
Data(), opt);
634 AddEntryFromListOfFunctions();
639 TIter nexthist(hlist);
640 while ((obj = nexthist())) {
644 else if (strlen(hist->
GetName()))
652 leg->AddEntry( obj, mes.
Data(), opt );
661 Info(
"BuildLegend",
"No object(s) to build a TLegend.");
704 while (
auto obj = next()) {
707 if (
n == subpadnumber) {
708 return ((
TPad*)obj)->
cd();
773 for (
Int_t i=0;i<2;i++) {
786 while(code1 + code2) {
797 if (ic == 0) ic = code2;
799 yt =
y[0] + (
y[1]-
y[0])*(xclipl-
x[0])/(
x[1]-
x[0]);
803 yt =
y[0] + (
y[1]-
y[0])*(xclipr-
x[0])/(
x[1]-
x[0]);
807 xt =
x[0] + (
x[1]-
x[0])*(yclipb-
y[0])/(
y[1]-
y[0]);
811 xt =
x[0] + (
x[1]-
x[0])*(yclipt-
y[0])/(
y[1]-
y[0]);
817 code1 =
ClippingCode(xt,yt,xclipl,yclipb,xclipr,yclipt);
821 code2 =
ClippingCode(xt,yt,xclipl,yclipb,xclipr,yclipt);
835 for (
Int_t i=0;i<2;i++) {
844 if (
x[0] < xclipl) code1 = code1 | 0x1;
845 if (
x[0] > xclipr) code1 = code1 | 0x2;
846 if (
y[0] < yclipb) code1 = code1 | 0x4;
847 if (
y[0] > yclipt) code1 = code1 | 0x8;
849 if (
x[1] < xclipl) code2 = code2 | 0x1;
850 if (
x[1] > xclipr) code2 = code2 | 0x2;
851 if (
y[1] < yclipb) code2 = code2 | 0x4;
852 if (
y[1] > yclipt) code2 = code2 | 0x8;
856 while(code1 + code2) {
867 if (ic == 0) ic = code2;
869 yt =
y[0] + (
y[1]-
y[0])*(xclipl-
x[0])/(
x[1]-
x[0]);
873 yt =
y[0] + (
y[1]-
y[0])*(xclipr-
x[0])/(
x[1]-
x[0]);
877 xt =
x[0] + (
x[1]-
x[0])*(yclipb-
y[0])/(
y[1]-
y[0]);
881 xt =
x[0] + (
x[1]-
x[0])*(yclipt-
y[0])/(
y[1]-
y[0]);
887 code1 =
ClippingCode(xt,yt,xclipl,yclipb,xclipr,yclipt);
891 code2 =
ClippingCode(xt,yt,xclipl,yclipb,xclipr,yclipt);
904 if (
x < xcl1) code = code | 0x1;
905 if (
x > xcl2) code = code | 0x2;
906 if (
y < ycl1) code = code | 0x4;
907 if (
y > ycl2) code = code | 0x8;
955 std::vector<Double_t> xc2(nn), yc2(nn);
961 for (i=0; i<
n; i++) {
970 xc2[nc2] = xclipl; yc2[nc2++] = slope*(xclipl-
x1)+
y1;
972 xc2[nc2] =
x2; yc2[nc2++] =
y2;
976 xc2[nc2] = xclipl; yc2[nc2++] = slope*(xclipl-
x1)+
y1;
977 xc2[nc2] =
x2; yc2[nc2++] =
y2;
984 x1 = xc2[nc2-1];
y1 = yc2[nc2-1];
986 for (i=0; i<nc2; i++) {
987 x2 = xc2[i];
y2 = yc2[i];
995 xc[nc] =
x1+(yclipt-
y1)*slope; yc[nc++] = yclipt;
997 xc[nc] =
x2; yc[nc++] =
y2;
1001 xc[nc] =
x1+(yclipt-
y1)*slope; yc[nc++] = yclipt;
1002 xc[nc] =
x2; yc[nc++] =
y2;
1011 x1 = xc[nc-1];
y1 = yc[nc-1];
1013 for (i=0; i<nc; i++) {
1014 x2 = xc[i];
y2 = yc[i];
1022 xc2[nc2] = xclipr; yc2[nc2++] = slope*(xclipr-
x1)+
y1;
1024 xc2[nc2] =
x2; yc2[nc2++] =
y2;
1028 xc2[nc2] = xclipr; yc2[nc2++] = slope*(xclipr-
x1)+
y1;
1029 xc2[nc2] =
x2; yc2[nc2++] =
y2;
1036 x1 = xc2[nc2-1];
y1 = yc2[nc2-1];
1038 for (i=0; i<nc2; i++) {
1039 x2 = xc2[i];
y2 = yc2[i];
1047 xc[nc] =
x1+(yclipb-
y1)*slope; yc[nc++] = yclipb;
1049 xc[nc] =
x2; yc[nc++] =
y2;
1053 xc[nc] =
x1+(yclipb-
y1)*slope; yc[nc++] = yclipb;
1054 xc[nc] =
x2; yc[nc++] =
y2;
1098 if (!
gROOT->GetListOfCanvases())
return;
1100 gROOT->GetListOfCanvases()->Remove(
this);
1122 if (
gROOT->GetSelectedPad() ==
this)
1123 gROOT->SetSelectedPad(
nullptr);
1147 while (
auto obj = next()) {
1149 ((
TPad*)obj)->CopyPixmap();
1150 ((
TPad*)obj)->CopyPixmaps();
1176 Int_t pxl, pyl, pxt, pyt;
1181 if (px1 < px2) {pxl = px1; pxt = px2;}
1182 else {pxl = px2; pxt = px1;}
1183 if (py1 < py2) {pyl = py1; pyt = py2;}
1184 else {pyl = py2; pyt = py1;}
1188 if ( (px > pxl && px < pxt) && (py > pyl && py < pyt) ) {
1195 if (py < pyl) dxl += pyl - py;
1196 if (py > pyt) dxl += py - pyt;
1198 if (py < pyl) dxt += pyl - py;
1199 if (py > pyt) dxt += py - pyt;
1201 if (px < pxl) dyl += pxl - px;
1202 if (px > pxt) dyl += px - pxt;
1204 if (px < pxl) dyt += pxl - px;
1205 if (px > pxt) dyt += px - pxt;
1207 Int_t distance = dxl;
1208 if (dxt < distance) distance = dxt;
1209 if (dyl < distance) distance = dyl;
1210 if (dyt < distance) distance = dyt;
1255 arr[1] =
this; arr[2] = (
void*)&nx;arr[3] = (
void*)& ny;
1256 arr[4] = (
void*)&xmargin; arr[5] = (
void *)& ymargin; arr[6] = (
void *)&color;
1257 if ((*
gThreadXAR)(
"PDCD", 7, arr,
nullptr))
return;
1263 if (nx <= 0) nx = 1;
1264 if (ny <= 0) ny = 1;
1271 if (xmargin > 0 && ymargin > 0) {
1275 for (iy=0;iy<ny;iy++) {
1276 y2 = 1 - iy*dy - ymargin;
1277 y1 =
y2 - dy + 2*ymargin;
1279 if (
y1 >
y2)
continue;
1280 for (ix=0;ix<nx;ix++) {
1281 x1 = ix*dx + xmargin;
1282 x2 =
x1 +dx -2*xmargin;
1283 if (
x1 >
x2)
continue;
1308 for (
Int_t i=0;i<nx;i++) {
1312 if (i == nx-1)
x2 = 1-xr;
1313 for (
Int_t j=0;j<ny;j++) {
1314 number = j*nx + i +1;
1317 if (j == 0)
y2 = 1-yt;
1318 if (j == ny-1)
y1 = 0;
1345 Error(
"DivideSquare",
"No canvas associated with this pad.");
1358 Divide(
w,
h, xmargin, ymargin, color);
1368 gROOT->MakeDefCanvas();
1405 if (!classobj)
return;
1410 TText *ptext =
nullptr;
1413 Int_t nd,nf,nc,nkd,nkf,i,j;
1426 Range(0,0,xpad,ypad);
1431 clevel[nlevel] = obj;
1440 if (nlevel >= maxlev-1)
break;
1444 Int_t ilevel, nelem;
1445 for (ilevel=nlevel;ilevel>=0;ilevel--) {
1446 cl = clevel[ilevel];
1448 if (nelem > maxelem) maxelem = nelem;
1449 nc = (nelem/50) + 1;
1459 if (dx < 1.3) dx = 1.3;
1460 tsizcm = tsizcm - 0.03*
Double_t(ncdraw-5);
1461 if (tsizcm < 0.27) tsizcm = 0.27;
1466 for (ilevel=nlevel;ilevel>=0;ilevel--) {
1467 cl = clevel[ilevel];
1469 if (nelem > maxelem) maxelem = nelem;
1470 nc = (nelem/50) + 1;
1472 if (ilevel < nlevel)
x1 =
x2 + 0.5;
1516 if (i >= nkd) { i = 1;
y =
y1 - 0.5*dy;
x += 1/
Double_t(nc); }
1517 else { i++;
y -= dy; }
1521 Int_t dim =
d->GetArrayDim();
1525 while (indx < dim ){
1526 ldname = strlen(dname);
1527 snprintf(&dname[ldname],256-ldname,
"[%d]",
d->GetMaxIndex(indx));
1548 while ((
m = (
TMethod *) nextm())) {
1550 !strcmp(
m->
GetName(),
"Dictionary" ) ||
1551 !strcmp(
m->
GetName(),
"Class_Version" ) ||
1552 !strcmp(
m->
GetName(),
"DeclFileName" ) ||
1553 !strcmp(
m->
GetName(),
"DeclFileLine" ) ||
1554 !strcmp(
m->
GetName(),
"ImplFileName" ) ||
1555 !strcmp(
m->
GetName(),
"ImplFileLine" )
1558 if (fcount > nf)
break;
1559 if (i >= nkf) { i = 1;
y = ysep - 0.5*dy;
x += 1/
Double_t(nc); }
1560 else { i++;
y -= dy; }
1565 for (j=ilevel-1;j>=0;j--) {
1566 if (cl == clevel[ilevel]) {
1567 if (clevel[j]->GetMethodAny((
char*)
m->
GetName())) {
1614 Int_t pxmin,pxmax,pymin,pymax,px,py;
1628 pxmax = canvas->
GetWw();
1630 pymax = cpad->
GetWh();
1634 if(pxold)
gVirtualX->DrawLine(pxold,pymin,pxold,pymax);
1635 if(pyold)
gVirtualX->DrawLine(pxmin,pyold,pxmax,pyold);
1684 Warning(
"DrawFrame",
"Must be called for the current pad only");
1691 if (hframe)
delete hframe;
1699 std::vector<Double_t> xbins(nbins+1);
1701 for (
Int_t i=1;i<=nbins;i++) {
1704 hframe =
new TH1F(
"hframe",title,nbins,xbins.data());
1727 Double_t xlow, ylow, xup, yup, hs, ws;
1732 gPad->SetFillColor(0);
1737 text.SetTextFont(61);
1738 text.SetTextSize(0.07);
1739 text.SetTextAlign(22);
1746 for (i=0;i<10;i++) {
1753 box.SetFillStyle(1001);
1754 box.SetFillColor(color);
1755 box.DrawBox(xlow, ylow, xup, yup);
1756 box.SetFillStyle(0);
1757 box.SetLineColor(1);
1758 box.DrawBox(xlow, ylow, xup, yup);
1759 if (color == 1)
text.SetTextColor(0);
1760 else text.SetTextColor(1);
1788 const Int_t kMaxDiff = 5;
1789 const Int_t kMinSize = 20;
1790 static Int_t pxorg, pyorg;
1791 static Int_t px1, px2, py1, py2, pxl, pyl, pxt, pyt, pxold, pyold;
1792 static Int_t px1p, px2p, py1p, py2p, pxlp, pylp, pxtp, pytp;
1793 static Bool_t pA, pB, pC, pD, pTop, pL, pR, pBot, pINSIDE;
1816 pA = pB = pC = pD = pTop = pL = pR = pBot = pINSIDE =
kFALSE;
1860 if (newcode)
return;
1927 pA = pB = pC = pD = pTop = pL = pR = pBot = pINSIDE =
kFALSE;
1931 pxold = pxl; pyold = pyl; pA =
kTRUE;
1936 pxold = pxt; pyold = pyl; pB =
kTRUE;
1941 pxold = pxt; pyold = pyt; pC =
kTRUE;
1946 pxold = pxl; pyold = pyt; pD =
kTRUE;
1950 if ((px > pxl+kMaxDiff && px < pxt-kMaxDiff) &&
1952 pxold = pxl; pyold = pyl; pTop =
kTRUE;
1956 if ((px > pxl+kMaxDiff && px < pxt-kMaxDiff) &&
1958 pxold = pxt; pyold = pyt; pBot =
kTRUE;
1962 if ((py > pyl+kMaxDiff && py < pyt-kMaxDiff) &&
1964 pxold = pxl; pyold = pyl; pL =
kTRUE;
1968 if ((py > pyl+kMaxDiff && py < pyt-kMaxDiff) &&
1970 pxold = pxt; pyold = pyt; pR =
kTRUE;
1974 if ((px > pxl+kMaxDiff && px < pxt-kMaxDiff) &&
1975 (py > pyl+kMaxDiff && py < pyt-kMaxDiff)) {
1976 pxold = px; pyold = py; pINSIDE =
kTRUE;
1984 if (pA || pB || pC || pD || pTop || pL || pR || pBot)
1987 if (!pA && !pB && !pC && !pD && !pTop && !pL && !pR && !pBot && !pINSIDE)
2000 if (px > pxt-kMinSize) { px = pxt-kMinSize; wx = px; }
2001 if (py > pyt-kMinSize) { py = pyt-kMinSize; wy = py; }
2002 if (px < pxlp) { px = pxlp; wx = px; }
2003 if (py < pylp) { py = pylp; wy = py; }
2021 if (px < pxl+kMinSize) { px = pxl+kMinSize; wx = px; }
2022 if (py > pyt-kMinSize) { py = pyt-kMinSize; wy = py; }
2023 if (px > pxtp) { px = pxtp; wx = px; }
2024 if (py < pylp) { py = pylp; wy = py; }
2042 if (px < pxl+kMinSize) { px = pxl+kMinSize; wx = px; }
2043 if (py < pyl+kMinSize) { py = pyl+kMinSize; wy = py; }
2044 if (px > pxtp) { px = pxtp; wx = px; }
2045 if (py > pytp) { py = pytp; wy = py; }
2063 if (px > pxt-kMinSize) { px = pxt-kMinSize; wx = px; }
2064 if (py < pyl+kMinSize) { py = pyl+kMinSize; wy = py; }
2065 if (px < pxlp) { px = pxlp; wx = px; }
2066 if (py > pytp) { py = pytp; wy = py; }
2085 if (py2 > py1-kMinSize) { py2 = py1-kMinSize; wy = py2; }
2086 if (py2 < py2p) { py2 = py2p; wy = py2; }
2101 if (py1 < py2+kMinSize) { py1 = py2+kMinSize; wy = py1; }
2102 if (py1 > py1p) { py1 = py1p; wy = py1; }
2117 if (px1 > px2-kMinSize) { px1 = px2-kMinSize; wx = px1; }
2118 if (px1 < px1p) { px1 = px1p; wx = px1; }
2134 if (px2 < px1+kMinSize) { px2 = px1+kMinSize; wx = px2; }
2135 if (px2 > px2p) { px2 = px2p; wx = px2; }
2150 Int_t dx = px - pxold;
2151 Int_t dy = py - pyold;
2152 px1 += dx; py1 += dy; px2 += dx; py2 += dy;
2153 if (px1 < px1p) { dx = px1p - px1; px1 += dx; px2 += dx; wx = px+dx; }
2154 if (px2 > px2p) { dx = px2 - px2p; px1 -= dx; px2 -= dx; wx = px-dx; }
2155 if (py1 > py1p) { dy = py1 - py1p; py1 -= dy; py2 -= dy; wy = py-dy; }
2156 if (py2 < py2p) { dy = py2p - py2; py1 += dy; py2 += dy; wy = py+dy; }
2197 if (pTop || pBot || pL || pR || pINSIDE) {
2204 if (px != pxorg || py != pyorg) {
2228 if (pINSIDE)
gPad->ShowGuidelines(
this, event);
2229 if (pTop)
gPad->ShowGuidelines(
this, event,
't',
true);
2230 if (pBot)
gPad->ShowGuidelines(
this, event,
'b',
true);
2231 if (pL)
gPad->ShowGuidelines(
this, event,
'l',
true);
2232 if (pR)
gPad->ShowGuidelines(
this, event,
'r',
true);
2233 if (pA)
gPad->ShowGuidelines(
this, event,
'1',
true);
2234 if (pB)
gPad->ShowGuidelines(
this, event,
'2',
true);
2235 if (pC)
gPad->ShowGuidelines(
this, event,
'3',
true);
2236 if (pD)
gPad->ShowGuidelines(
this, event,
'4',
true);
2245 if (
gROOT->IsEscaped()) {
2250 if (opaque||ropaque) {
2279 if (pTop || pBot || pL || pR || pINSIDE) {
2286 if (pA || pB || pC || pD || pTop || pL || pR || pBot)
2292 if (px != pxorg || py != pyorg) {
2329 event =
gVirtualX->RequestLocator(1, 1, px, py);
2368 static Int_t axisNumber;
2370 static Int_t px1old, py1old, px2old, py2old;
2371 Int_t nbd, inc, bin1, bin2, first, last;
2374 static std::unique_ptr<TBox> zoombox;
2375 Double_t zbx1=0,zbx2=0,zby1=0,zby2=0;
2382 if (strstr(opt,
"cont4")) {
2391 if (!strcmp(axis->
GetName(),
"xaxis")) {
2395 if (!strcmp(axis->
GetName(),
"yaxis")) {
2399 if (!strcmp(axis->
GetName(),
"zaxis")) {
2405 if (axisNumber == 1) {
2411 }
else if (axisNumber == 2) {
2427 if (axisNumber == 1) {
2432 }
else if (axisNumber == 2) {
2446 zoombox = std::make_unique<TBox>(zbx1, zby1, zbx2, zby2);
2451 zoombox->SetFillColor(ci);
2457 if (!opaque)
gVirtualX->SetLineColor(-1);
2465 if (axisNumber == 1) {
2475 if (axisNumber == 1) {
2480 }
else if (axisNumber == 2) {
2495 zoombox->SetX1(zbx1);
2496 zoombox->SetY1(zby1);
2497 zoombox->SetX2(zbx2);
2498 zoombox->SetY2(zby2);
2535 if (
gROOT->IsEscaped()) {
2537 if (opaque && zoombox)
2544 if (ratio1 > ratio2) {
2549 if (ratio2 - ratio1 > 0.05) {
2551 if (axisNumber == 3 && hobj && hobj->
GetDimension() != 3) {
2560 Float_t newmin = zmin + (zmax-zmin)*ratio1;
2561 Float_t newmax = zmin + (zmax-zmin)*ratio2;
2574 bin1 = first +
Int_t((last-first+1)*ratio1);
2575 bin2 = first +
Int_t((last-first+1)*ratio2);
2585 if (axisNumber == 1) {
2593 }
else if (axisNumber == 2) {
2621 xmin = ((
xmin-xmi)/(xma-xmi))*(up-low)+low;
2622 xmax = ((
xmax-xmi)/(xma-xmi))*(up-low)+low;
2625 if (!strcmp(axis->
GetName(),
"xaxis")) axisNumber = 1;
2626 if (!strcmp(axis->
GetName(),
"yaxis")) axisNumber = 2;
2627 if (ratio2 - ratio1 > 0.05) {
2634 if (axisNumber == 1) axis->
SetRange(bin1,bin2);
2635 if (axisNumber == 2 && hobj1) {
2652 while ((obj= next())) {
2655 if (hobj == hobj1)
continue;
2658 if (axisNumber == 1) {
2660 }
else if (axisNumber == 2) {
2704 if (found)
return found;
2706 while (
auto cur = next()) {
2709 if (found)
return found;
2724 if (found)
return found;
2726 while (
auto cur = next()) {
2729 if (found)
return found;
2804 if (
fCanvas ==
this)
return nullptr;
2813 if (
fCanvas ==
this)
return nullptr;
2822 if (
fCanvas ==
this)
return nullptr;
2988 while ((obj=next())) {
2992 if (found)
return found;
3002 if (!subpadnumber) {
3009 while ((obj = next())) {
3012 if (pad->
GetNumber() == subpadnumber)
return pad;
3059 if (color <= 0)
return;
3077 gROOT->SetSelectedPad(
this);
3106 if (opt.
Index(
"pfc")>=0 || opt.
Index(
"plc")>=0 || opt.
Index(
"pmc")>=0) {
3124 if (i>=ncolors) i = ncolors-1;
3136 Int_t const cellSize = 10;
3143 for (
int i = 0; i <
fCGnx; i++)
3144 for (
int j = 0; j <
fCGny; j++)
3150 while(
auto o = iter()) {
3163 while (
auto og = nextgraph())
3167 while (
auto oh = nexthist()) {
3181 for (
int r = i;
r <
w + i;
r++) {
3182 for (
int c = j;
c <
h + j;
c++) {
3217 bool isFirstVertical =
false;
3218 bool isFirstHorizontal =
false;
3220 for (std::size_t i = 0;
option[i] !=
'\0'; ++i) {
3221 char letter = std::tolower(
option[i]);
3222 if (letter ==
'w') {
3227 }
else if (letter ==
't' || letter ==
'b') {
3228 isFirstVertical = !isFirstHorizontal;
3230 dy = letter ==
't' ? -1 : 1;
3231 }
else if (letter ==
'l' || letter ==
'r') {
3232 isFirstHorizontal = !isFirstVertical;
3234 dx = letter ==
'r' ? -1 : 1;
3238 if(dx < 0) std::swap(nxbeg, nxend);
3239 if(dy < 0) std::swap(nybeg, nyend);
3241 auto attemptPlacement = [&](
Int_t i,
Int_t j) {
3251 if(!isFirstVertical) {
3252 for (
Int_t i = nxbeg; i != nxend; i += dx) {
3253 for (
Int_t j = nybeg; j != nyend; j += dy) {
3254 if (attemptPlacement(i, j))
return true;
3259 for (
Int_t j = nybeg; j != nyend; j += dy) {
3260 for (
Int_t i = nxbeg; i != nxend; i += dx) {
3261 if (attemptPlacement(i, j))
return true;
3269#define NotFree(i, j) fCollideGrid[TMath::Max(TMath::Min(i+j*fCGnx,fCGnx*fCGny),0)] = kFALSE;
3298 for (i=
x1+1; i<
x2; i++) {
3308 for (j=
y1+1; j<
y2; j++) {
3328 for (
int i =
x1; i<=
x2; i++) {
3347 for (i =
x1; i<=
x2; i++) {
3352 for (i =
y1; i<=
y2; i++) {
3370 for (
Int_t i=s; i<
n; i=i+s) {
3372 g->GetPoint(i ,
x2,
y2);
3399 if (
name.Index(
"hframe") >= 0)
return;
3404 bool haserrors =
false;
3405 TString drawOption =
h->GetDrawOption();
3409 if (drawOption.
Index(
"hist") < 0) {
3410 if (drawOption.
Index(
"e") >= 0) haserrors =
true;
3413 Int_t nx =
h->GetNbinsX();
3418 for (i = 1; i<nx; i++) {
3420 x1l =
h->GetBinCenter(i);
3426 y1l =
h->GetBinContent(i)-
h->GetBinErrorLow(i);
3432 y2l =
h->GetBinContent(i)+
h->GetBinErrorUp(i);
3438 for (j=
y1; j<=
y2; j++) {
3442 x1l =
h->GetBinLowEdge(i);
3448 y1l =
h->GetBinContent(i);
3455 x1l =
h->GetBinLowEdge(i)+
h->GetBinWidth(i);
3491 for (
int i = 0; i<
fCGnx; i++) {
3494 for (
int j = 0; j<
fCGny; j++) {
3511 box.DrawBox(X1L, Y1L, X2L, Y2L);
3513 box.SetFillColorAlpha(
kRed,t);
3514 box.DrawBox(X1L, Y1L, X2L, Y2L);
3518 if (t==0.15) t = 0.1;
3612 TObject *obj = lnk->GetObject();
3622 began3DScene =
kTRUE;
3625 obj->
Paint(lnk->GetOption());
3658 if (color < 0) color = -color;
3665 if (bordersize <= 0) bordersize = 2;
3686 if (px1 < px2) {xl =
fX1; xt =
fX2; }
3687 else {xl =
fX2; xt =
fX1;}
3688 if (py1 > py2) {yl =
fY1; yt =
fY2;}
3689 else {yl =
fY2; yt =
fY1;}
3691 Double_t frameXs[7] = {}, frameYs[7] = {};
3695 frameXs[0] = xl; frameYs[0] = yl;
3696 frameXs[1] = xl + realBsX; frameYs[1] = yl + realBsY;
3697 frameXs[2] = frameXs[1]; frameYs[2] = yt - realBsY;
3698 frameXs[3] = xt - realBsX; frameYs[3] = frameYs[2];
3699 frameXs[4] = xt; frameYs[4] = yt;
3700 frameXs[5] = xl; frameYs[5] = yt;
3701 frameXs[6] = xl; frameYs[6] = yl;
3708 frameXs[0] = xl; frameYs[0] = yl;
3709 frameXs[1] = xl + realBsX; frameYs[1] = yl + realBsY;
3710 frameXs[2] = xt - realBsX; frameYs[2] = frameYs[1];
3711 frameXs[3] = frameXs[2]; frameYs[3] = yt - realBsY;
3712 frameXs[4] = xt; frameYs[4] = yt;
3713 frameXs[5] = xt; frameYs[5] = yl;
3714 frameXs[6] = xl; frameYs[6] = yl;
3820 auto lnk = pList ? pList->
FirstLink() :
nullptr;
3824 ((
TPad*)obj)->PaintModified();
3852 auto lnk = pList ? pList->
FirstLink() :
nullptr;
3855 TObject *obj = lnk->GetObject();
3857 ((
TPad*)obj)->PaintModified();
3869 began3DScene =
kTRUE;
3872 obj->
Paint(lnk->GetOption());
3914 xb[0] =
x1; xb[1] =
x1; xb[2] =
x2; xb[3] =
x2;
3915 yb[0] =
y1; yb[1] =
y2; yb[2] =
y2; yb[3] =
y1;
3967 if (style0 >= 3100 && style0 < 4000) {
3969 xb[0] =
x1; xb[1] =
x1; xb[2] =
x2; xb[3] =
x2;
3970 yb[0] =
y1; yb[1] =
y2; yb[2] =
y2; yb[3] =
y1;
3995 TIter next(start->GetListOfPrimitives());
3996 while ((obj = next())) {
3998 if (obj == stop)
break;
3999 ((
TPad*)obj)->CopyBackgroundPixmap(
x,
y);
4000 ((
TPad*)obj)->CopyBackgroundPixmaps((
TPad*)obj, stop,
x,
y);
4019 Warning(
"TPad::PaintFillArea",
"Float_t signature is obsolete. Use Double_t signature.");
4037 std::vector<Double_t>
x(nc, 0.);
4038 std::vector<Double_t>
y(nc, 0.);
4047 if (fillstyle >= 3100 && fillstyle < 4000) {
4067 std::vector<Double_t> xw(
n), yw(
n);
4068 for (
int i=0; i<
n; i++) {
4110 static Double_t ang1[10] = { 0., 10., 20., 30., 45.,5., 60., 70., 80., 89.99};
4111 static Double_t ang2[10] = {180.,170.,160.,150.,135.,5.,120.,110.,100., 89.99};
4113 Int_t fasi = FillStyle % 1000;
4114 Int_t idSPA = fasi / 100;
4115 Int_t iAng2 = (fasi - 100 * idSPA) / 10;
4116 Int_t iAng1 = fasi % 10;
4119 Int_t lss = 0, lss2 = 0, lcs = 0, lcs2 = 0;
4140 if (ang1[iAng1] != 5.)
PaintHatches(dy, ang1[iAng1], nn, xx, yy);
4141 if (ang2[iAng2] != 5.)
PaintHatches(dy, ang2[iAng2], nn, xx, yy);
4168 const Int_t maxnbi = 100;
4169 Double_t xli[maxnbi], xlh[2], ylh[2], xt1, xt2, yt1, yt2;
4170 Double_t ll,
x,
y,
x1,
x2,
y1,
y2,
a,
b, xi, xip, xin, yi, yip;
4176 ratiox = 1./(rwxmax-rwxmin);
4177 ratioy = 1./(rwymax-rwymin);
4190 gPad->GetPadPar(x1p,y1p,x2p,y2p);
4199 for (i=1; i<=nn; i++) {
4200 x = wndc*ratiox*(xx[i-1]-rwxmin);
4201 y = hndc*ratioy*(yy[i-1]-rwymin);
4202 yrot = sina*
x+cosa*
y;
4208 for (ycur=
ymax; ycur>=
ymin; ycur=ycur-dy) {
4210 for (i=2; i<=nn+1; i++) {
4213 if (i == nn+1) i2=1;
4214 x1 = wndc*ratiox*(xx[i1-1]-rwxmin);
4215 y1 = hndc*ratioy*(yy[i1-1]-rwymin);
4216 x2 = wndc*ratiox*(xx[i2-1]-rwxmin);
4217 y2 = hndc*ratioy*(yy[i2-1]-rwymin);
4218 xt1 = cosa*
x1-sina*
y1;
4219 yt1 = sina*
x1+cosa*
y1;
4220 xt2 = cosa*
x2-sina*
y2;
4221 yt2 = sina*
x2+cosa*
y2;
4232 if ((yi <= ycur) && (ycur < yip)) {
4234 if (nbi >= maxnbi)
return;
4244 if (nbi >= maxnbi)
return;
4247 if (nbi >= maxnbi)
return;
4254 a = (yt1-yt2)/(xt1-xt2);
4255 b = (yt2*xt1-xt2*yt1)/(xt1-xt2);
4264 if ((xi <= xin) && (xin < xip) &&
4268 if (nbi >= maxnbi)
return;
4277 for (i=1; i<=
m; i++) {
4278 if (xli[i] < xli[i-1]) {
4286 if (
inv == 0)
goto L50;
4292 if (nbi%2 != 0)
continue;
4294 for (i=1; i<=nbi; i=i+2) {
4296 xlh[0] = cosb*xli[i-1]-sinb*ycur;
4297 ylh[0] = sinb*xli[i-1]+cosb*ycur;
4298 xlh[1] = cosb*xli[i] -sinb*ycur;
4299 ylh[1] = sinb*xli[i] +cosb*ycur;
4301 xlh[0] = (xlh[0]/wndc)*(rwxmax-rwxmin)+rwxmin;
4302 ylh[0] = (ylh[0]/hndc)*(rwymax-rwymin)+rwymin;
4303 xlh[1] = (xlh[1]/wndc)*(rwxmax-rwxmin)+rwxmin;
4304 ylh[1] = (ylh[1]/hndc)*(rwymax-rwymin)+rwymin;
4305 gPad->PaintLine(xlh[0], ylh[0], xlh[1], ylh[1]);
4364 for (i=0;i<3;i++) temp[i] = p1[i];
4366 for (i=0;i<3;i++) temp[i] = p2[i];
4368 PaintLine(xpad[0],xpad[1],xpad[3],xpad[4]);
4382 for (i=0;i<3;i++) temp[i] = p1[i];
4384 for (i=0;i<3;i++) temp[i] = p2[i];
4386 PaintLine(xpad[0],xpad[1],xpad[3],xpad[4]);
4403 for (i=0; i<
n-1; i++) {
4415 if (iclip == 0 && i <
n-2)
continue;
4452 Int_t i, i1=-1,
np=1, iclip=0;
4454 for (i=0; i <
n-1; i++) {
4468 if (iclip == 0 && i <
n-2)
continue;
4498 std::vector<Double_t> xw(
n), yw(
n);
4499 for (
Int_t i=0; i<
n; i++) {
4516 for (
Int_t i = 1; i <
n; i++)
4535 for (i=0; i<
n; i++) {
4539 if (i <
n-1)
continue;
4541 if (
np == 0)
continue;
4566 for (i=0; i<
n; i++) {
4570 if (i <
n-1)
continue;
4572 if (
np == 0)
continue;