133 fPadPointer =
nullptr;
134 fPrimitives =
nullptr;
149 fPadView3D =
nullptr;
179 fFixedAspectRatio =
kFALSE;
182 fNumPaletteColor = 0;
183 fNextPaletteColor = 0;
184 fCollideGrid =
nullptr;
198 fUxmin = fUymin = fUxmax = fUymax = 0;
247 :
TVirtualPad(
name,title,xlow,ylow,xup,yup,color,bordersize,bordermode)
331 Error(
"TPad",
"You must create a TCanvas before creating a TPad");
338 if ((xlow < 0) || (xlow > 1) || (ylow < 0) || (ylow > 1)) {
339 Error(
"TPad",
"illegal bottom left position: x=%f, y=%f", xlow, ylow);
342 if ((xup < 0) || (xup > 1) || (yup < 0) || (yup > 1)) {
343 Error(
"TPad",
"illegal top right position: x=%f, y=%f", xup, yup);
347 Error(
"TPad",
"illegal width: %f", xup-xlow);
351 Error(
"TPad",
"illegal height: %f", yup-ylow);
362 SetPad(
name, title, xlow, ylow, xup, yup, color, bordersize, bordermode);
463 while ((exec = (
TExec*)next())) {
504 const char* title,
Option_t *option)
513 while( (o=next()) ) {
519 mes = ((
TNamed *)o)->GetTitle();
524 if (strlen(option)) {
535 TIter nextgraph(grlist);
538 while ((obj = nextgraph())) {
543 if (strlen(option)) opt = option;
545 leg->AddEntry( obj, mes.
Data(), opt );
550 TIter nexthist(hlist);
553 while ((obj = nexthist())) {
558 if (strlen(option)) opt = option;
560 leg->AddEntry( obj, mes.
Data(), opt );
571 Info(
"BuildLegend(void)",
"No object to build a TLegend.");
615 while ((obj = next())) {
618 if (
n == subpadnumber) {
619 return ((
TPad*)obj)->
cd();
688 for (
Int_t i=0;i<2;i++) {
701 while(code1 + code2) {
712 if (ic == 0) ic = code2;
714 yt =
y[0] + (
y[1]-
y[0])*(xclipl-
x[0])/(
x[1]-
x[0]);
718 yt =
y[0] + (
y[1]-
y[0])*(xclipr-
x[0])/(
x[1]-
x[0]);
722 xt =
x[0] + (
x[1]-
x[0])*(yclipb-
y[0])/(
y[1]-
y[0]);
726 xt =
x[0] + (
x[1]-
x[0])*(yclipt-
y[0])/(
y[1]-
y[0]);
732 code1 =
ClippingCode(xt,yt,xclipl,yclipb,xclipr,yclipt);
736 code2 =
ClippingCode(xt,yt,xclipl,yclipb,xclipr,yclipt);
759 for (
Int_t i=0;i<2;i++) {
768 if (
x[0] < xclipl) code1 = code1 | 0x1;
769 if (
x[0] > xclipr) code1 = code1 | 0x2;
770 if (
y[0] < yclipb) code1 = code1 | 0x4;
771 if (
y[0] > yclipt) code1 = code1 | 0x8;
773 if (
x[1] < xclipl) code2 = code2 | 0x1;
774 if (
x[1] > xclipr) code2 = code2 | 0x2;
775 if (
y[1] < yclipb) code2 = code2 | 0x4;
776 if (
y[1] > yclipt) code2 = code2 | 0x8;
780 while(code1 + code2) {
791 if (ic == 0) ic = code2;
793 yt =
y[0] + (
y[1]-
y[0])*(xclipl-
x[0])/(
x[1]-
x[0]);
797 yt =
y[0] + (
y[1]-
y[0])*(xclipr-
x[0])/(
x[1]-
x[0]);
801 xt =
x[0] + (
x[1]-
x[0])*(yclipb-
y[0])/(
y[1]-
y[0]);
805 xt =
x[0] + (
x[1]-
x[0])*(yclipt-
y[0])/(
y[1]-
y[0]);
811 code1 =
ClippingCode(xt,yt,xclipl,yclipb,xclipr,yclipt);
815 code2 =
ClippingCode(xt,yt,xclipl,yclipb,xclipr,yclipt);
828 if (
x < xcl1) code = code | 0x1;
829 if (
x > xcl2) code = code | 0x2;
830 if (
y < ycl1) code = code | 0x4;
831 if (
y > ycl2) code = code | 0x8;
886 for (i=0; i<
n; i++) {
887 x2 =
x[i]; y2 =
y[i];
891 slope = (y2-y1)/(
x2-
x1);
895 xc2[nc2] = xclipl; yc2[nc2++] = slope*(xclipl-
x1)+y1;
897 xc2[nc2] =
x2; yc2[nc2++] = y2;
901 xc2[nc2] = xclipl; yc2[nc2++] = slope*(xclipl-
x1)+y1;
902 xc2[nc2] =
x2; yc2[nc2++] = y2;
909 x1 = xc2[nc2-1]; y1 = yc2[nc2-1];
911 for (i=0; i<nc2; i++) {
912 x2 = xc2[i]; y2 = yc2[i];
916 slope = (
x2-
x1)/(y2-y1);
920 xc[nc] =
x1+(yclipt-y1)*slope; yc[nc++] = yclipt;
922 xc[nc] =
x2; yc[nc++] = y2;
926 xc[nc] =
x1+(yclipt-y1)*slope; yc[nc++] = yclipt;
927 xc[nc] =
x2; yc[nc++] = y2;
936 x1 = xc[nc-1]; y1 = yc[nc-1];
938 for (i=0; i<nc; i++) {
939 x2 = xc[i]; y2 = yc[i];
943 slope = (y2-y1)/(
x2-
x1);
947 xc2[nc2] = xclipr; yc2[nc2++] = slope*(xclipr-
x1)+y1;
949 xc2[nc2] =
x2; yc2[nc2++] = y2;
953 xc2[nc2] = xclipr; yc2[nc2++] = slope*(xclipr-
x1)+y1;
954 xc2[nc2] =
x2; yc2[nc2++] = y2;
961 x1 = xc2[nc2-1]; y1 = yc2[nc2-1];
963 for (i=0; i<nc2; i++) {
964 x2 = xc2[i]; y2 = yc2[i];
968 slope = (
x2-
x1)/(y2-y1);
972 xc[nc] =
x1+(yclipb-y1)*slope; yc[nc++] = yclipb;
974 xc[nc] =
x2; yc[nc++] = y2;
978 xc[nc] =
x1+(yclipb-y1)*slope; yc[nc++] = yclipb;
979 xc[nc] =
x2; yc[nc++] = y2;
1016 if (IsA() != TCanvas::Class())
1026 if (!
gROOT->GetListOfCanvases())
return;
1028 gROOT->GetListOfCanvases()->Remove(
this);
1050 if (
gROOT->GetSelectedPad() ==
this)
gROOT->SetSelectedPad(
nullptr);
1075 while ((obj = next())) {
1077 ((
TPad*)obj)->CopyPixmap();
1078 ((
TPad*)obj)->CopyPixmaps();
1104 Int_t pxl, pyl, pxt, pyt;
1109 if (px1 < px2) {pxl = px1; pxt = px2;}
1110 else {pxl = px2; pxt = px1;}
1111 if (py1 < py2) {pyl = py1; pyt = py2;}
1112 else {pyl = py2; pyt = py1;}
1116 if ( (px > pxl && px < pxt) && (py > pyl && py < pyt) ) {
1123 if (py < pyl) dxl += pyl - py;
1124 if (py > pyt) dxl += py - pyt;
1126 if (py < pyl) dxt += pyl - py;
1127 if (py > pyt) dxt += py - pyt;
1129 if (px < pxl) dyl += pxl - px;
1130 if (px > pxt) dyl += px - pxt;
1132 if (px < pxl) dyt += pxl - px;
1133 if (px > pxt) dyt += px - pxt;
1135 Int_t distance = dxl;
1136 if (dxt < distance) distance = dxt;
1137 if (dyl < distance) distance = dyl;
1138 if (dyt < distance) distance = dyt;
1184 arr[1] =
this; arr[2] = (
void*)&nx;arr[3] = (
void*)& ny;
1185 arr[4] = (
void*)&xmargin; arr[5] = (
void *)& ymargin; arr[6] = (
void *)&color;
1186 if ((*
gThreadXAR)(
"PDCD", 7, arr, 0))
return;
1191 if (nx <= 0) nx = 1;
1192 if (ny <= 0) ny = 1;
1199 char *
name =
new char [nchname];
1200 char *title =
new char [nchtitle];
1203 if (xmargin > 0 && ymargin > 0) {
1207 for (iy=0;iy<ny;iy++) {
1208 y2 = 1 - iy*dy - ymargin;
1209 y1 = y2 - dy + 2*ymargin;
1211 if (y1 > y2)
continue;
1212 for (ix=0;ix<nx;ix++) {
1213 x1 = ix*dx + xmargin;
1214 x2 =
x1 +dx -2*xmargin;
1215 if (
x1 >
x2)
continue;
1240 for (
Int_t i=0;i<nx;i++) {
1244 if (i == nx-1)
x2 = 1-xr;
1245 for (
Int_t j=0;j<ny;j++) {
1246 number = j*nx + i +1;
1249 if (j == 0) y2 = 1-yt;
1250 if (j == ny-1) y1 = 0;
1269 if (padsav) padsav->
cd();
1280 Error(
"DivideSquare",
"No canvas associated with this pad.");
1293 Divide( w,
h, xmargin, ymargin, color);
1303 gROOT->MakeDefCanvas();
1335 if (!classobj)
return;
1343 Int_t nd,nf,nc,nkd,nkf,i,j;
1356 Range(0,0,xpad,ypad);
1361 clevel[nlevel] = obj;
1370 if (nlevel >= maxlev-1)
break;
1374 Int_t ilevel, nelem;
1375 for (ilevel=nlevel;ilevel>=0;ilevel--) {
1376 cl = clevel[ilevel];
1378 if (nelem > maxelem) maxelem = nelem;
1379 nc = (nelem/50) + 1;
1389 if (dx < 1.3) dx = 1.3;
1390 tsizcm = tsizcm - 0.03*
Double_t(ncdraw-5);
1391 if (tsizcm < 0.27) tsizcm = 0.27;
1396 for (ilevel=nlevel;ilevel>=0;ilevel--) {
1397 cl = clevel[ilevel];
1399 if (nelem > maxelem) maxelem = nelem;
1400 nc = (nelem/50) + 1;
1402 if (ilevel < nlevel)
x1 =
x2 + 0.5;
1446 if (i >= nkd) { i = 1;
y = y1 - 0.5*dy;
x += 1/
Double_t(nc); }
1447 else { i++;
y -= dy; }
1451 Int_t dim =
d->GetArrayDim();
1455 while (indx < dim ){
1456 ldname = strlen(dname);
1457 snprintf(&dname[ldname],256-ldname,
"[%d]",
d->GetMaxIndex(indx));
1478 while ((
m = (
TMethod *) nextm())) {
1480 !strcmp(
m->GetName(),
"Dictionary" ) ||
1481 !strcmp(
m->GetName(),
"Class_Version" ) ||
1482 !strcmp(
m->GetName(),
"DeclFileName" ) ||
1483 !strcmp(
m->GetName(),
"DeclFileLine" ) ||
1484 !strcmp(
m->GetName(),
"ImplFileName" ) ||
1485 !strcmp(
m->GetName(),
"ImplFileLine" )
1488 if (fcount > nf)
break;
1489 if (i >= nkf) { i = 1;
y = ysep - 0.5*dy;
x += 1/
Double_t(nc); }
1490 else { i++;
y -= dy; }
1495 for (j=ilevel-1;j>=0;j--) {
1496 if (cl == clevel[ilevel]) {
1497 if (clevel[j]->GetMethodAny((
char*)
m->GetName())) {
1544 Int_t pxmin,pxmax,pymin,pymax,pxold,pyold,px,py;
1556 pxmax = canvas->
GetWw();
1558 pymax = cpad->
GetWh();
1562 if(pxold)
gVirtualX->DrawLine(pxold,pymin,pxold,pymax);
1563 if(pyold)
gVirtualX->DrawLine(pxmin,pyold,pxmax,pyold);
1610 if (
this != padsav) {
1611 Warning(
"DrawFrame",
"Must be called for the current pad only");
1618 if (hframe)
delete hframe;
1628 for (
Int_t i=1;i<=nbins;i++) {
1631 hframe =
new TH1F(
"hframe",title,nbins,xbins);
1644 if (padsav) padsav->
cd();
1660 gPad->SetFillColor(0);
1674 for (i=0;i<10;i++) {
1681 box->SetFillStyle(1001);
1682 box->SetFillColor(color);
1683 box->DrawBox(xlow, ylow, xup, yup);
1684 box->SetFillStyle(0);
1685 box->SetLineColor(1);
1686 box->DrawBox(xlow, ylow, xup, yup);
1716 const Int_t kMaxDiff = 5;
1717 const Int_t kMinSize = 20;
1718 static Int_t pxorg, pyorg;
1719 static Int_t px1, px2, py1, py2, pxl, pyl, pxt, pyt, pxold, pyold;
1720 static Int_t px1p, px2p, py1p, py2p, pxlp, pylp, pxtp, pytp;
1721 static Bool_t pA, pB, pC, pD, pTop, pL, pR, pBot, pINSIDE;
1744 pA = pB = pC = pD = pTop = pL = pR = pBot = pINSIDE =
kFALSE;
1788 if (newcode)
return;
1855 pA = pB = pC = pD = pTop = pL = pR = pBot = pINSIDE =
kFALSE;
1859 pxold = pxl; pyold = pyl; pA =
kTRUE;
1864 pxold = pxt; pyold = pyl; pB =
kTRUE;
1869 pxold = pxt; pyold = pyt; pC =
kTRUE;
1874 pxold = pxl; pyold = pyt; pD =
kTRUE;
1878 if ((px > pxl+kMaxDiff && px < pxt-kMaxDiff) &&
1880 pxold = pxl; pyold = pyl; pTop =
kTRUE;
1884 if ((px > pxl+kMaxDiff && px < pxt-kMaxDiff) &&
1886 pxold = pxt; pyold = pyt; pBot =
kTRUE;
1890 if ((py > pyl+kMaxDiff && py < pyt-kMaxDiff) &&
1892 pxold = pxl; pyold = pyl; pL =
kTRUE;
1896 if ((py > pyl+kMaxDiff && py < pyt-kMaxDiff) &&
1898 pxold = pxt; pyold = pyt; pR =
kTRUE;
1902 if ((px > pxl+kMaxDiff && px < pxt-kMaxDiff) &&
1903 (py > pyl+kMaxDiff && py < pyt-kMaxDiff)) {
1904 pxold = px; pyold = py; pINSIDE =
kTRUE;
1912 if (pA || pB || pC || pD || pTop || pL || pR || pBot)
1915 if (!pA && !pB && !pC && !pD && !pTop && !pL && !pR && !pBot && !pINSIDE)
1928 if (px > pxt-kMinSize) { px = pxt-kMinSize; wx = px; }
1929 if (py > pyt-kMinSize) { py = pyt-kMinSize; wy = py; }
1930 if (px < pxlp) { px = pxlp; wx = px; }
1931 if (py < pylp) { py = pylp; wy = py; }
1949 if (px < pxl+kMinSize) { px = pxl+kMinSize; wx = px; }
1950 if (py > pyt-kMinSize) { py = pyt-kMinSize; wy = py; }
1951 if (px > pxtp) { px = pxtp; wx = px; }
1952 if (py < pylp) { py = pylp; wy = py; }
1970 if (px < pxl+kMinSize) { px = pxl+kMinSize; wx = px; }
1971 if (py < pyl+kMinSize) { py = pyl+kMinSize; wy = py; }
1972 if (px > pxtp) { px = pxtp; wx = px; }
1973 if (py > pytp) { py = pytp; wy = py; }
1991 if (px > pxt-kMinSize) { px = pxt-kMinSize; wx = px; }
1992 if (py < pyl+kMinSize) { py = pyl+kMinSize; wy = py; }
1993 if (px < pxlp) { px = pxlp; wx = px; }
1994 if (py > pytp) { py = pytp; wy = py; }
2013 if (py2 > py1-kMinSize) { py2 = py1-kMinSize; wy = py2; }
2014 if (py2 < py2p) { py2 = py2p; wy = py2; }
2029 if (py1 < py2+kMinSize) { py1 = py2+kMinSize; wy = py1; }
2030 if (py1 > py1p) { py1 = py1p; wy = py1; }
2045 if (px1 > px2-kMinSize) { px1 = px2-kMinSize; wx = px1; }
2046 if (px1 < px1p) { px1 = px1p; wx = px1; }
2062 if (px2 < px1+kMinSize) { px2 = px1+kMinSize; wx = px2; }
2063 if (px2 > px2p) { px2 = px2p; wx = px2; }
2078 Int_t dx = px - pxold;
2079 Int_t dy = py - pyold;
2080 px1 += dx; py1 += dy; px2 += dx; py2 += dy;
2081 if (px1 < px1p) { dx = px1p - px1; px1 += dx; px2 += dx; wx = px+dx; }
2082 if (px2 > px2p) { dx = px2 - px2p; px1 -= dx; px2 -= dx; wx = px-dx; }
2083 if (py1 > py1p) { dy = py1 - py1p; py1 -= dy; py2 -= dy; wy = py-dy; }
2084 if (py2 < py2p) { dy = py2p - py2; py1 += dy; py2 += dy; wy = py+dy; }
2098 x1 =
x2 = y1 = y2 = 0;
2125 if (pTop || pBot || pL || pR || pINSIDE) {
2132 if (px != pxorg || py != pyorg) {
2156 if (pINSIDE)
gPad->ShowGuidelines(
this, event);
2157 if (pTop)
gPad->ShowGuidelines(
this, event,
't',
true);
2158 if (pBot)
gPad->ShowGuidelines(
this, event,
'b',
true);
2159 if (pL)
gPad->ShowGuidelines(
this, event,
'l',
true);
2160 if (pR)
gPad->ShowGuidelines(
this, event,
'r',
true);
2161 if (pA)
gPad->ShowGuidelines(
this, event,
'1',
true);
2162 if (pB)
gPad->ShowGuidelines(
this, event,
'2',
true);
2163 if (pC)
gPad->ShowGuidelines(
this, event,
'3',
true);
2164 if (pD)
gPad->ShowGuidelines(
this, event,
'4',
true);
2173 if (
gROOT->IsEscaped()) {
2178 if (opaque||ropaque) {
2181 x1 =
x2 = y1 = y2 = 0;
2207 if (pTop || pBot || pL || pR || pINSIDE) {
2214 if (pA || pB || pC || pD || pTop || pL || pR || pBot)
2220 if (px != pxorg || py != pyorg) {
2257 event =
gVirtualX->RequestLocator(1, 1, px, py);
2296 static Int_t axisNumber;
2298 static Int_t px1old, py1old, px2old, py2old;
2302 static TBox *zoombox;
2303 Double_t zbx1=0,zbx2=0,zby1=0,zby2=0;
2310 if (strstr(opt,
"cont4")) {
2319 if (!strcmp(axis->
GetName(),
"xaxis")) {
2323 if (!strcmp(axis->
GetName(),
"yaxis")) {
2327 if (!strcmp(axis->
GetName(),
"zaxis")) {
2333 if (axisNumber == 1) {
2339 }
else if (axisNumber == 2) {
2355 if (axisNumber == 1) {
2360 }
else if (axisNumber == 2) {
2374 zoombox =
new TBox(zbx1, zby1, zbx2, zby2);
2385 if (!opaque)
gVirtualX->SetLineColor(-1);
2393 if (axisNumber == 1) {
2403 if (axisNumber == 1) {
2408 }
else if (axisNumber == 2) {
2423 zoombox->
SetX1(zbx1);
2424 zoombox->
SetY1(zby1);
2425 zoombox->
SetX2(zbx2);
2426 zoombox->
SetY2(zby2);
2459 if (
gROOT->IsEscaped()) {
2461 if (opaque && zoombox) {
2470 if (ratio1 > ratio2) {
2475 if (ratio2 - ratio1 > 0.05) {
2477 if (axisNumber == 3 && hobj && hobj->
GetDimension() != 3) {
2486 Float_t newmin = zmin + (zmax-zmin)*ratio1;
2487 Float_t newmax = zmin + (zmax-zmin)*ratio2;
2511 if (axisNumber == 1) {
2519 }
else if (axisNumber == 2) {
2547 xmin = ((
xmin-xmi)/(xma-xmi))*(up-low)+low;
2548 xmax = ((
xmax-xmi)/(xma-xmi))*(up-low)+low;
2551 if (!strcmp(axis->
GetName(),
"xaxis")) axisNumber = 1;
2552 if (!strcmp(axis->
GetName(),
"yaxis")) axisNumber = 2;
2553 if (ratio2 - ratio1 > 0.05) {
2560 if (axisNumber == 1) axis->
SetRange(bin1,bin2);
2561 if (axisNumber == 2 && hobj1) {
2578 while ((obj= next())) {
2581 if (hobj == hobj1)
continue;
2584 if (axisNumber == 1) {
2586 }
else if (axisNumber == 2) {
2629 if (found)
return found;
2632 while ((cur = next())) {
2635 if (found)
return found;
2650 if (found)
return found;
2653 while ((cur = next())) {
2656 if (found)
return found;
2731 if (
fCanvas ==
this)
return nullptr;
2740 if (
fCanvas ==
this)
return nullptr;
2749 if (
fCanvas ==
this)
return nullptr;
2896 while ((obj=next())) {
2900 if (found)
return found;
2910 if (!subpadnumber) {
2917 while ((obj = next())) {
2920 if (pad->
GetNumber() == subpadnumber)
return pad;
2967 if (color <= 0)
return;
2985 gROOT->SetSelectedPad(
this);
3002 <<
" Name= "<<
GetName()<<
" Title= "<<
GetTitle()<<
" Option="<<option<<std::endl;
3014 if (opt.
Index(
"pfc")>=0 || opt.
Index(
"plc")>=0 || opt.
Index(
"pmc")>=0) {
3032 if (i>=ncolors) i = ncolors-1;
3044 Int_t const cellSize = 10;
3063 for (
int i = 0; i<
fCGnx; i++) {
3064 for (
int j = 0; j<
fCGny; j++) {
3076 for (
int i=0; i<np; i++) {
3085 TIter nextgraph(grlist);
3091 TIter nexthist(hlist);
3093 while ((oh = nexthist())) {
3107 for (
int r=i;
r<w+i;
r++) {
3108 for (
int c=j;
c<
h+j;
c++) {
3136 for (
Int_t i = 0; i<nxmax; i++) {
3137 for (
Int_t j = 0; j<=nymax; j++) {
3150#define NotFree(i, j) fCollideGrid[TMath::Max(TMath::Min(i+j*fCGnx,fCGnx*fCGny),0)] = kFALSE;
3177 yt = y1; y1 = y2; y2 = yt;
3179 for (i=
x1+1; i<
x2; i++) {
3186 yt = y1; y1 = y2; y2 = yt;
3189 for (j=y1+1; j<y2; j++) {
3209 for (
int i =
x1; i<=
x2; i++) {
3210 for (
int j = y1; j<=y2; j++)
NotFree(i, j);
3228 for (i =
x1; i<=
x2; i++) {
3233 for (i = y1; i<=y2; i++) {
3251 for (
Int_t i=1; i<
n; i++) {
3252 g->GetPoint(i-1,
x1,y1);
3253 g->GetPoint(i ,
x2,y2);
3267 (
int)((y1-
fY1)/ys), (
int)((y2-
fY1)/ys));
3280 if (
name.Index(
"hframe") >= 0)
return;
3285 bool haserrors =
false;
3286 TString drawOption =
h->GetDrawOption();
3290 if (drawOption.
Index(
"hist") < 0) {
3291 if (drawOption.
Index(
"e") >= 0) haserrors =
true;
3294 Int_t nx =
h->GetNbinsX();
3299 for (i = 1; i<nx; i++) {
3301 x1l =
h->GetBinCenter(i);
3307 y1l =
h->GetBinContent(i)-
h->GetBinErrorLow(i);
3313 y2l =
h->GetBinContent(i)+
h->GetBinErrorUp(i);
3319 for (j=y1; j<=y2; j++) {
3323 x1l =
h->GetBinLowEdge(i);
3329 y1l =
h->GetBinContent(i);
3336 x1l =
h->GetBinLowEdge(i)+
h->GetBinWidth(i);
3358 box->SetFillColorAlpha(
kRed,0.5);
3369 for (
int i = 0; i<
fCGnx; i++) {
3372 for (
int j = 0; j<
fCGny; j++) {
3373 if (
gPad->GetLogx()) {
3380 if (
gPad->GetLogy()) {
3389 box->DrawBox(X1L, Y1L, X2L, Y2L);
3391 box->SetFillColorAlpha(
kRed,t);
3392 box->DrawBox(X1L, Y1L, X2L, Y2L);
3396 if (t==0.15) t = 0.1;
3490 began3DScene =
kTRUE;
3497 if (padsav) padsav->
cd();
3526 if (color < 0) color = -color;
3533 if (bordersize <= 0) bordersize = 2;
3554 if (px1 < px2) {xl =
fX1; xt =
fX2; }
3555 else {xl =
fX2; xt =
fX1;}
3556 if (py1 > py2) {yl =
fY1; yt =
fY2;}
3557 else {yl =
fY2; yt =
fY1;}
3559 Double_t frameXs[7] = {}, frameYs[7] = {};
3563 frameXs[0] = xl; frameYs[0] = yl;
3564 frameXs[1] = xl + realBsX; frameYs[1] = yl + realBsY;
3565 frameXs[2] = frameXs[1]; frameYs[2] = yt - realBsY;
3566 frameXs[3] = xt - realBsX; frameYs[3] = frameYs[2];
3567 frameXs[4] = xt; frameYs[4] = yt;
3568 frameXs[5] = xl; frameYs[5] = yt;
3569 frameXs[6] = xl; frameYs[6] = yl;
3576 frameXs[0] = xl; frameYs[0] = yl;
3577 frameXs[1] = xl + realBsX; frameYs[1] = yl + realBsY;
3578 frameXs[2] = xt - realBsX; frameYs[2] = frameYs[1];
3579 frameXs[3] = frameXs[2]; frameYs[3] = yt - realBsY;
3580 frameXs[4] = xt; frameYs[4] = yt;
3581 frameXs[5] = xt; frameYs[5] = yl;
3582 frameXs[6] = xl; frameYs[6] = yl;
3715 ((
TPad*)obj)->PaintModified();
3727 began3DScene =
kTRUE;
3735 if (padsav) padsav->
cd();
3759 if (option[0] ==
's') {
3772 xb[0] =
x1; xb[1] =
x1; xb[2] =
x2; xb[3] =
x2;
3773 yb[0] = y1; yb[1] = y2; yb[2] = y2; yb[3] = y1;
3822 if (option[0] ==
's') {
3825 if (style0 >= 3100 && style0 < 4000) {
3827 xb[0] =
x1; xb[1] =
x1; xb[2] =
x2; xb[3] =
x2;
3828 yb[0] = y1; yb[1] = y2; yb[2] = y2; yb[3] = y1;
3834 if (option[0] ==
'l') {
3854 while ((obj = next())) {
3856 if (obj == stop)
break;
3857 ((
TPad*)obj)->CopyBackgroundPixmap(
x,
y);
3858 ((
TPad*)obj)->CopyBackgroundPixmaps((
TPad*)obj, stop,
x,
y);
3877 Warning(
"TPad::PaintFillArea",
"Float_t signature is obsolete. Use Double_t signature.");
3895 std::vector<Double_t>
x(nc, 0.);
3896 std::vector<Double_t>
y(nc, 0.);
3905 if (fillstyle >= 3100 && fillstyle < 4000) {
3927 for (
int i=0; i<
n; i++) {
3971 static Double_t ang1[10] = { 0., 10., 20., 30., 45.,5., 60., 70., 80., 89.99};
3972 static Double_t ang2[10] = {180.,170.,160.,150.,135.,5.,120.,110.,100., 89.99};
3974 Int_t fasi = FillStyle%1000;
3977 Int_t iAng1 = fasi%10;
4010 if (ang1[iAng1] != 5.)
PaintHatches(dy, ang1[iAng1], nn, xx, yy);
4011 if (ang2[iAng2] != 5.)
PaintHatches(dy, ang2[iAng2], nn, xx, yy);
4038 const Int_t maxnbi = 100;
4039 Double_t xli[maxnbi], xlh[2], ylh[2], xt1, xt2, yt1, yt2;
4040 Double_t ll,
x,
y,
x1,
x2, y1, y2,
a,
b, xi, xip, xin, yi, yip;
4046 ratiox = 1./(rwxmax-rwxmin);
4047 ratioy = 1./(rwymax-rwymin);
4060 gPad->GetPadPar(x1p,y1p,x2p,y2p);
4069 for (i=1; i<=nn; i++) {
4070 x = wndc*ratiox*(xx[i-1]-rwxmin);
4071 y = hndc*ratioy*(yy[i-1]-rwymin);
4072 yrot = sina*
x+cosa*
y;
4078 for (ycur=
ymax; ycur>=
ymin; ycur=ycur-dy) {
4080 for (i=2; i<=nn+1; i++) {
4083 if (i == nn+1) i2=1;
4084 x1 = wndc*ratiox*(xx[i1-1]-rwxmin);
4085 y1 = hndc*ratioy*(yy[i1-1]-rwymin);
4086 x2 = wndc*ratiox*(xx[i2-1]-rwxmin);
4087 y2 = hndc*ratioy*(yy[i2-1]-rwymin);
4088 xt1 = cosa*
x1-sina*y1;
4089 yt1 = sina*
x1+cosa*y1;
4090 xt2 = cosa*
x2-sina*y2;
4091 yt2 = sina*
x2+cosa*y2;
4102 if ((yi <= ycur) && (ycur < yip)) {
4104 if (nbi >= maxnbi)
return;
4114 if (nbi >= maxnbi)
return;
4117 if (nbi >= maxnbi)
return;
4124 a = (yt1-yt2)/(xt1-xt2);
4125 b = (yt2*xt1-xt2*yt1)/(xt1-xt2);
4134 if ((xi <= xin) && (xin < xip) &&
4138 if (nbi >= maxnbi)
return;
4147 for (i=1; i<=
m; i++) {
4148 if (xli[i] < xli[i-1]) {
4156 if (
inv == 0)
goto L50;
4162 if (nbi%2 != 0)
continue;
4164 for (i=1; i<=nbi; i=i+2) {
4166 xlh[0] = cosb*xli[i-1]-sinb*ycur;
4167 ylh[0] = sinb*xli[i-1]+cosb*ycur;
4168 xlh[1] = cosb*xli[i] -sinb*ycur;
4169 ylh[1] = sinb*xli[i] +cosb*ycur;
4171 xlh[0] = (xlh[0]/wndc)*(rwxmax-rwxmin)+rwxmin;
4172 ylh[0] = (ylh[0]/hndc)*(rwymax-rwymin)+rwymin;
4173 xlh[1] = (xlh[1]/wndc)*(rwxmax-rwxmin)+rwxmin;
4174 ylh[1] = (ylh[1]/hndc)*(rwymax-rwymin)+rwymin;
4175 gPad->PaintLine(xlh[0], ylh[0], xlh[1], ylh[1]);
4186 x[0] =
x1;
x[1] =
x2;
y[0] = y1;
y[1] = y2;
4236 for (i=0;i<3;i++) temp[i] = p1[i];
4238 for (i=0;i<3;i++) temp[i] = p2[i];
4240 PaintLine(xpad[0],xpad[1],xpad[3],xpad[4]);
4254 for (i=0;i<3;i++) temp[i] = p1[i];
4256 for (i=0;i<3;i++) temp[i] = p2[i];
4258 PaintLine(xpad[0],xpad[1],xpad[3],xpad[4]);
4274 Int_t i, i1=-1,np=1;
4275 for (i=0; i<
n-1; i++) {
4287 if (iclip == 0 && i <
n-2)
continue;
4321 if (option && (option[0] ==
'C')) mustClip =
kFALSE;
4324 Int_t i, i1=-1, np=1, iclip=0;
4326 for (i=0; i <
n-1; i++) {
4340 if (iclip == 0 && i <
n-2)
continue;
4372 for (
Int_t i=0; i<
n; i++) {
4391 for (
Int_t i = 1; i <
n; i++)
4410 for (i=0; i<
n; i++) {
4414 if (i <
n-1)
continue;
4416 if (np == 0)
continue;
4441 for (i=0; i<
n; i++) {
4445 if (i <
n-1)
continue;
4447 if (np == 0)
continue;
4537 if (
gPad == 0)
return 0;
4544 if (
this !=
gPad->GetCanvas()) {
4553 TPad *picked =
this;
4557 pickobj = &dummyLink;
4586 pick = ((
TPad*)obj)->
Pick(px, py, pickobj);
4591 }
else if (!
gROOT->GetEditorMode()) {
4598 if (dist == 0)
break;
4613 if (
fView && !gotPrim) {
4637 if (picked ==
this) {
4660 while ((obj = next()))
4694 ((
TPad*)
this)->SaveAs(filename);
4706 while ((obj = next())) {