150 fMother = (TPad*)
gPad;
179 fFixedAspectRatio =
kFALSE;
192 fUxmin = fUymin = fUxmax = fUymax = 0;
241 :
TVirtualPad(name,title,xlow,ylow,xup,yup,color,bordersize,bordermode)
285 Error(
"TPad",
"You must create a TCanvas before creating a TPad");
292 if ((xlow < 0) || (xlow > 1) || (ylow < 0) || (ylow > 1)) {
293 Error(
"TPad",
"illegal bottom left position: x=%f, y=%f", xlow, ylow);
296 if ((xup < 0) || (xup > 1) || (yup < 0) || (yup > 1)) {
297 Error(
"TPad",
"illegal top right position: x=%f, y=%f", xup, yup);
308 SetPad(name, title, xlow, ylow, xup, yup, color, bordersize, bordermode);
431 while( (o=
next()) ) {
435 if (!leg) leg =
new TLegend(x1, y1, x2, y2, title);
448 if (!leg) leg =
new TLegend(x1, y1, x2, y2, title);
450 TIter nextgraph(grlist);
453 while ((obj = nextgraph())) {
461 if (!leg) leg =
new TLegend(x1, y1, x2, y2, title);
463 TIter nexthist(hlist);
466 while ((obj = nexthist())) {
482 Info(
"BuildLegend(void)",
"No object to build a TLegend.");
525 while ((obj =
next())) {
528 if (n == subpadnumber) {
529 return ((
TPad*)obj)->cd();
591 for (
Int_t i=0;i<2;i++) {
604 while(code1 + code2) {
615 if (ic == 0) ic = code2;
617 yt = y[0] + (y[1]-y[0])*(xclipl-x[0])/(x[1]-x[0]);
621 yt = y[0] + (y[1]-y[0])*(xclipr-x[0])/(x[1]-x[0]);
625 xt = x[0] + (x[1]-x[0])*(yclipb-y[0])/(y[1]-y[0]);
629 xt = x[0] + (x[1]-x[0])*(yclipt-y[0])/(y[1]-y[0]);
635 code1 =
ClippingCode(xt,yt,xclipl,yclipb,xclipr,yclipt);
639 code2 =
ClippingCode(xt,yt,xclipl,yclipb,xclipr,yclipt);
662 for (
Int_t i=0;i<2;i++) {
671 if (x[0] < xclipl) code1 = code1 | 0x1;
672 if (x[0] > xclipr) code1 = code1 | 0x2;
673 if (y[0] < yclipb) code1 = code1 | 0x4;
674 if (y[0] > yclipt) code1 = code1 | 0x8;
676 if (x[1] < xclipl) code2 = code2 | 0x1;
677 if (x[1] > xclipr) code2 = code2 | 0x2;
678 if (y[1] < yclipb) code2 = code2 | 0x4;
679 if (y[1] > yclipt) code2 = code2 | 0x8;
683 while(code1 + code2) {
694 if (ic == 0) ic = code2;
696 yt = y[0] + (y[1]-y[0])*(xclipl-x[0])/(x[1]-x[0]);
700 yt = y[0] + (y[1]-y[0])*(xclipr-x[0])/(x[1]-x[0]);
704 xt = x[0] + (x[1]-x[0])*(yclipb-y[0])/(y[1]-y[0]);
708 xt = x[0] + (x[1]-x[0])*(yclipt-y[0])/(y[1]-y[0]);
714 code1 =
ClippingCode(xt,yt,xclipl,yclipb,xclipr,yclipt);
718 code2 =
ClippingCode(xt,yt,xclipl,yclipb,xclipr,yclipt);
731 if (x < xcl1) code = code | 0x1;
732 if (x > xcl2) code = code | 0x2;
733 if (y < ycl1) code = code | 0x4;
734 if (y > ycl2) code = code | 0x8;
786 x1 = x[n-1]; y1 = y[n-1];
789 for (i=0; i<
n; i++) {
790 x2 = x[i]; y2 = y[i];
794 slope = (y2-y1)/(x2-x1);
798 xc2[nc2] = xclipl; yc2[nc2++] = slope*(xclipl-
x1)+y1;
800 xc2[nc2] =
x2; yc2[nc2++] = y2;
804 xc2[nc2] = xclipl; yc2[nc2++] = slope*(xclipl-
x1)+y1;
805 xc2[nc2] =
x2; yc2[nc2++] = y2;
812 x1 = xc2[nc2-1]; y1 = yc2[nc2-1];
814 for (i=0; i<nc2; i++) {
815 x2 = xc2[i]; y2 = yc2[i];
819 slope = (x2-
x1)/(y2-y1);
823 xc[nc] = x1+(yclipt-y1)*slope; yc[nc++] = yclipt;
825 xc[nc] =
x2; yc[nc++] = y2;
829 xc[nc] = x1+(yclipt-y1)*slope; yc[nc++] = yclipt;
830 xc[nc] =
x2; yc[nc++] = y2;
837 x1 = xc[nc-1]; y1 = yc[nc-1];
839 for (i=0; i<nc; i++) {
840 x2 = xc[i]; y2 = yc[i];
844 slope = (y2-y1)/(x2-x1);
848 xc2[nc2] = xclipr; yc2[nc2++] = slope*(xclipr-
x1)+y1;
850 xc2[nc2] =
x2; yc2[nc2++] = y2;
854 xc2[nc2] = xclipr; yc2[nc2++] = slope*(xclipr-
x1)+y1;
855 xc2[nc2] =
x2; yc2[nc2++] = y2;
862 x1 = xc2[nc2-1]; y1 = yc2[nc2-1];
864 for (i=0; i<nc2; i++) {
865 x2 = xc2[i]; y2 = yc2[i];
869 slope = (x2-
x1)/(y2-y1);
873 xc[nc] = x1+(yclipb-y1)*slope; yc[nc++] = yclipb;
875 xc[nc] =
x2; yc[nc++] = y2;
879 xc[nc] = x1+(yclipb-y1)*slope; yc[nc++] = yclipb;
880 xc[nc] =
x2; yc[nc++] = y2;
920 if (!
gPad->IsBatch()) {
927 if (!
gROOT->GetListOfCanvases())
return;
929 gROOT->GetListOfCanvases()->Remove(
this);
950 if (
gROOT->GetSelectedPad() ==
this)
gROOT->SetSelectedPad(0);
975 while ((obj =
next())) {
977 ((
TPad*)obj)->CopyPixmap();
978 ((
TPad*)obj)->CopyPixmaps();
1004 Int_t pxl, pyl, pxt, pyt;
1009 if (px1 < px2) {pxl = px1; pxt = px2;}
1010 else {pxl = px2; pxt = px1;}
1011 if (py1 < py2) {pyl = py1; pyt = py2;}
1012 else {pyl = py2; pyt = py1;}
1016 if ( (px > pxl && px < pxt) && (py > pyl && py < pyt) ) {
1023 if (py < pyl) dxl += pyl -
py;
if (py > pyt) dxl += py - pyt;
1025 if (py < pyl) dxt += pyl -
py;
if (py > pyt) dxt += py - pyt;
1027 if (px < pxl) dyl += pxl -
px;
if (px > pxt) dyl += px - pxt;
1029 if (px < pxl) dyt += pxl -
px;
if (px > pxt) dyt += px - pxt;
1032 if (dxt < distance) distance = dxt;
1033 if (dyl < distance) distance = dyl;
1034 if (dyt < distance) distance = dyt;
1080 arr[1] =
this; arr[2] = (
void*)&nx;arr[3] = (
void*)& ny;
1081 arr[4] = (
void*)&xmargin; arr[5] = (
void *)& ymargin; arr[6] = (
void *)&color;
1082 if ((*
gThreadXAR)(
"PDCD", 7, arr, 0))
return;
1087 if (nx <= 0) nx = 1;
1088 if (ny <= 0) ny = 1;
1095 char *
name =
new char [nchname];
1096 char *
title =
new char [nchtitle];
1099 if (xmargin > 0 && ymargin > 0) {
1103 for (iy=0;iy<
ny;iy++) {
1104 y2 = 1 - iy*dy - ymargin;
1105 y1 = y2 - dy + 2*ymargin;
1107 if (y1 > y2)
continue;
1108 for (ix=0;ix<
nx;ix++) {
1109 x1 = ix*dx + xmargin;
1110 x2 = x1 +dx -2*xmargin;
1111 if (x1 > x2)
continue;
1113 snprintf(name,nchname,
"%s_%d",
GetName(),n);
1114 pad =
new TPad(name,name,x1,y1,x2,y2,color);
1140 if (i == nx-1) x2 = 1-xr;
1142 number = j*nx + i +1;
1145 if (j == 0) y2 = 1-yt;
1146 if (j == ny-1) y1 = 0;
1147 snprintf(name,nchname,
"%s_%d",
GetName(),number);
1148 snprintf(title,nchtitle,
"%s_%d",
GetTitle(),number);
1149 pad =
new TPad(name,title,x1,y1,x2,y2);
1165 if (padsav) padsav->
cd();
1186 Divide( w,
h, xmargin, ymargin, color);
1196 gROOT->MakeDefCanvas();
1234 Int_t nd,nf,nc,nkd,nkf,i,j;
1247 Range(0,0,xpad,ypad);
1252 clevel[nlevel] =
obj;
1261 if (nlevel >= maxlev-1)
break;
1265 Int_t ilevel, nelem;
1266 for (ilevel=nlevel;ilevel>=0;ilevel--) {
1267 cl = clevel[ilevel];
1269 if (nelem > maxelem) maxelem = nelem;
1270 nc = (nelem/50) + 1;
1280 if (dx < 1.3) dx = 1.3;
1281 tsizcm = tsizcm - 0.03*
Double_t(ncdraw-5);
1282 if (tsizcm < 0.27) tsizcm = 0.27;
1287 for (ilevel=nlevel;ilevel>=0;ilevel--) {
1288 cl = clevel[ilevel];
1290 if (nelem > maxelem) maxelem = nelem;
1291 nc = (nelem/50) + 1;
1293 if (ilevel < nlevel) x1 = x2 + 0.5;
1311 v1 = y1 -
Double_t(nkf+nkd+nc-1)*dy;
1323 TBox *
box = pt->
AddBox(0,(y1+0.01-v1)/dv,0,(v2-0.01-v1)/dv);
1325 pt->
AddLine(0,(y1-v1)/dv,0,(y1-v1)/dv);
1337 if (i >= nkd) { i = 1; y = y1 - 0.5*dy; x += 1/
Double_t(nc); }
1338 else { i++; y -= dy; }
1346 while (indx < dim ){
1347 ldname = strlen(dname);
1348 snprintf(&dname[ldname],256,
"[%d]",d->
GetMaxIndex(indx));
1351 pt->
AddText(x,(y-v1)/dv,dname);
1358 pt->
AddLine(0,(ysep-v1)/dv,0,(ysep-v1)/dv);
1369 while ((m = (
TMethod *) nextm())) {
1371 !strcmp( m->
GetName(),
"Dictionary" ) ||
1372 !strcmp( m->
GetName(),
"Class_Version" ) ||
1373 !strcmp( m->
GetName(),
"DeclFileName" ) ||
1374 !strcmp( m->
GetName(),
"DeclFileLine" ) ||
1375 !strcmp( m->
GetName(),
"ImplFileName" ) ||
1376 !strcmp( m->
GetName(),
"ImplFileLine" )
1379 if (fcount > nf)
break;
1380 if (i >= nkf) { i = 1; y = ysep - 0.5*dy; x += 1/
Double_t(nc); }
1381 else { i++; y -= dy; }
1386 for (j=ilevel-1;j>=0;j--) {
1387 if (cl == clevel[ilevel]) {
1388 if (clevel[j]->GetMethodAny((
char*)m->
GetName())) {
1435 Int_t pxmin,pxmax,pymin,pymax,pxold,pyold,
px,
py;
1447 pxmax = canvas->
GetWw();
1449 pymax = cpad->
GetWh();
1451 if(pxold)
gVirtualX->DrawLine(pxold,pymin,pxold,pymax);
1452 if(pyold)
gVirtualX->DrawLine(pxmin,pyold,pxmax,pyold);
1479 if (
this != padsav) {
1480 Warning(
"DrawFrame",
"Must be called for the current pad only");
1481 return padsav->
DrawFrame(xmin,ymin,xmax,ymax,title);
1487 if (hframe)
delete hframe;
1491 if (
fLogx && xmin > 0 && xmax > xmin) {
1500 hframe =
new TH1F(
"hframe",title,nbins,xbins);
1503 hframe =
new TH1F(
"hframe",title,nbins,xmin,xmax);
1513 if (padsav) padsav->
cd();
1524 Double_t xlow, ylow, xup, yup, hs, ws;
1529 gPad->SetFillColor(0);
1531 gPad->Range(x1,y1,x2,y2);
1543 for (i=0;i<10;i++) {
1552 box->
DrawBox(xlow, ylow, xup, yup);
1555 box->
DrawBox(xlow, ylow, xup, yup);
1558 text->
DrawText(0.5*(xlow+xup), 0.5*(ylow+yup),
Form(
"%d",color));
1585 const Int_t kMaxDiff = 5;
1586 const Int_t kMinSize = 20;
1587 static Int_t pxorg, pyorg;
1588 static Int_t px1, px2, py1, py2, pxl, pyl, pxt, pyt, pxold, pyold;
1589 static Int_t px1p, px2p, py1p, py2p, pxlp, pylp, pxtp, pytp;
1590 static Bool_t pA, pB, pC, pD, pTop, pL, pR, pBot, pINSIDE;
1613 pA = pB = pC = pD = pTop = pL = pR = pBot = pINSIDE =
kFALSE;
1657 if (newcode)
return;
1724 pA = pB = pC = pD = pTop = pL = pR = pBot = pINSIDE =
kFALSE;
1728 pxold = pxl; pyold = pyl; pA =
kTRUE;
1733 pxold = pxt; pyold = pyl; pB =
kTRUE;
1738 pxold = pxt; pyold = pyt; pC =
kTRUE;
1743 pxold = pxl; pyold = pyt; pD =
kTRUE;
1747 if ((px > pxl+kMaxDiff && px < pxt-kMaxDiff) &&
1749 pxold = pxl; pyold = pyl; pTop =
kTRUE;
1753 if ((px > pxl+kMaxDiff && px < pxt-kMaxDiff) &&
1755 pxold = pxt; pyold = pyt; pBot =
kTRUE;
1759 if ((py > pyl+kMaxDiff && py < pyt-kMaxDiff) &&
1761 pxold = pxl; pyold = pyl; pL =
kTRUE;
1765 if ((py > pyl+kMaxDiff && py < pyt-kMaxDiff) &&
1767 pxold = pxt; pyold = pyt; pR =
kTRUE;
1771 if ((px > pxl+kMaxDiff && px < pxt-kMaxDiff) &&
1772 (py > pyl+kMaxDiff && py < pyt-kMaxDiff)) {
1773 pxold =
px; pyold =
py; pINSIDE =
kTRUE;
1781 if (pA || pB || pC || pD || pTop || pL || pR || pBot)
1784 if (!pA && !pB && !pC && !pD && !pTop && !pL && !pR && !pBot && !pINSIDE)
1797 if (px > pxt-kMinSize) { px = pxt-kMinSize; wx =
px; }
1798 if (py > pyt-kMinSize) { py = pyt-kMinSize; wy =
py; }
1799 if (px < pxlp) { px = pxlp; wx =
px; }
1800 if (py < pylp) { py = pylp; wy =
py; }
1818 if (px < pxl+kMinSize) { px = pxl+kMinSize; wx =
px; }
1819 if (py > pyt-kMinSize) { py = pyt-kMinSize; wy =
py; }
1820 if (px > pxtp) { px = pxtp; wx =
px; }
1821 if (py < pylp) { py = pylp; wy =
py; }
1839 if (px < pxl+kMinSize) { px = pxl+kMinSize; wx =
px; }
1840 if (py < pyl+kMinSize) { py = pyl+kMinSize; wy =
py; }
1841 if (px > pxtp) { px = pxtp; wx =
px; }
1842 if (py > pytp) { py = pytp; wy =
py; }
1860 if (px > pxt-kMinSize) { px = pxt-kMinSize; wx =
px; }
1861 if (py < pyl+kMinSize) { py = pyl+kMinSize; wy =
py; }
1862 if (px < pxlp) { px = pxlp; wx =
px; }
1863 if (py > pytp) { py = pytp; wy =
py; }
1882 if (py2 > py1-kMinSize) { py2 = py1-kMinSize; wy = py2; }
1883 if (py2 < py2p) { py2 = py2p; wy = py2; }
1898 if (py1 < py2+kMinSize) { py1 = py2+kMinSize; wy = py1; }
1899 if (py1 > py1p) { py1 = py1p; wy = py1; }
1914 if (px1 > px2-kMinSize) { px1 = px2-kMinSize; wx = px1; }
1915 if (px1 < px1p) { px1 = px1p; wx = px1; }
1931 if (px2 < px1+kMinSize) { px2 = px1+kMinSize; wx = px2; }
1932 if (px2 > px2p) { px2 = px2p; wx = px2; }
1947 Int_t dx = px - pxold;
1948 Int_t dy = py - pyold;
1949 px1 += dx; py1 += dy; px2 += dx; py2 += dy;
1950 if (px1 < px1p) { dx = px1p - px1; px1 += dx; px2 += dx; wx = px+dx; }
1951 if (px2 > px2p) { dx = px2 - px2p; px1 -= dx; px2 -= dx; wx = px-dx; }
1952 if (py1 > py1p) { dy = py1 - py1p; py1 -= dy; py2 -= dy; wy = py-dy; }
1953 if (py2 < py2p) { dy = py2p - py2; py1 += dy; py2 += dy; wy = py+dy; }
1967 x1 = x2 = y1 = y2 = 0;
1994 if (pTop || pBot || pL || pR || pINSIDE) {
2001 if (px != pxorg || py != pyorg) {
2025 if (pINSIDE)
gPad->ShowGuidelines(
this, event);
2026 if (pTop)
gPad->ShowGuidelines(
this, event,
't',
true);
2027 if (pBot)
gPad->ShowGuidelines(
this, event,
'b',
true);
2028 if (pL)
gPad->ShowGuidelines(
this, event,
'l',
true);
2029 if (pR)
gPad->ShowGuidelines(
this, event,
'r',
true);
2030 if (pA)
gPad->ShowGuidelines(
this, event,
'1',
true);
2031 if (pB)
gPad->ShowGuidelines(
this, event,
'2',
true);
2032 if (pC)
gPad->ShowGuidelines(
this, event,
'3',
true);
2033 if (pD)
gPad->ShowGuidelines(
this, event,
'4',
true);
2042 if (
gROOT->IsEscaped()) {
2047 if (opaque||ropaque) {
2050 x1 = x2 = y1 = y2 = 0;
2076 if (pTop || pBot || pL || pR || pINSIDE) {
2083 if (pA || pB || pC || pD || pTop || pL || pR || pBot)
2089 if (px != pxorg || py != pyorg) {
2125 event =
gVirtualX->RequestLocator(1, 1, px, py);
2164 static Int_t axisNumber;
2166 static Int_t px1old, py1old, px2old, py2old;
2170 static TBox *zoombox;
2171 Double_t zbx1=0,zbx2=0,zby1=0,zby2=0;
2178 if (strstr(opt,
"cont4")) {
2187 if (!strcmp(axis->
GetName(),
"xaxis")) {
2191 if (!strcmp(axis->
GetName(),
"yaxis")) {
2195 if (!strcmp(axis->
GetName(),
"zaxis")) {
2201 if (axisNumber == 1) {
2207 }
else if (axisNumber == 2) {
2223 if (axisNumber == 1) {
2228 }
else if (axisNumber == 2) {
2242 zoombox =
new TBox(zbx1, zby1, zbx2, zby2);
2253 if (!opaque)
gVirtualX->SetLineColor(-1);
2261 if (axisNumber == 1) {
2271 if (axisNumber == 1) {
2276 }
else if (axisNumber == 2) {
2290 zoombox->
SetX1(zbx1);
2291 zoombox->
SetY1(zby1);
2292 zoombox->
SetX2(zbx2);
2293 zoombox->
SetY2(zby2);
2325 if (
gROOT->IsEscaped()) {
2327 if (opaque && zoombox) {
2336 if (ratio1 > ratio2) {
2341 if (ratio2 - ratio1 > 0.05) {
2343 if (axisNumber == 3 && hobj && hobj->
GetDimension() != 3) {
2352 Float_t newmin = zmin + (zmax-zmin)*ratio1;
2353 Float_t newmax = zmin + (zmax-zmin)*ratio2;
2366 bin1 = first +
Int_t((last-first+1)*ratio1);
2367 bin2 = first +
Int_t((last-first+1)*ratio2);
2377 if (axisNumber == 1) {
2385 }
else if (axisNumber == 2) {
2413 xmin = ((xmin-xmi)/(xma-xmi))*(up-low)+low;
2414 xmax = ((xmax-xmi)/(xma-xmi))*(up-low)+low;
2417 if (!strcmp(axis->
GetName(),
"xaxis")) axisNumber = 1;
2418 if (!strcmp(axis->
GetName(),
"yaxis")) axisNumber = 2;
2419 if (ratio2 - ratio1 > 0.05) {
2426 if (axisNumber == 1) axis->
SetRange(bin1,bin2);
2427 if (axisNumber == 2 && hobj1) {
2444 while ((obj=
next())) {
2447 if (hobj == hobj1)
continue;
2450 if (axisNumber == 1) {
2452 }
else if (axisNumber == 2) {
2495 if (found)
return found;
2498 while ((cur =
next())) {
2501 if (found)
return found;
2516 if (found)
return found;
2519 while ((cur =
next())) {
2522 if (found)
return found;
2597 if (
fCanvas ==
this)
return 0;
2606 if (
fCanvas ==
this)
return 0;
2615 if (
fCanvas ==
this)
return 0;
2736 if (!frame) fFrame =
new TFrame(0,0,1,1);
2739 fFrame->SetFillColor(framecolor);
2758 while ((obj=
next())) {
2759 if (!strcmp(name, obj->
GetName()))
return obj;
2762 if (found)
return found;
2772 if (!subpadnumber) {
2779 while ((obj =
next())) {
2782 if (pad->
GetNumber() == subpadnumber)
return pad;
2829 if (color <= 0)
return;
2847 gROOT->SetSelectedPad(
this);
2864 <<
" Name= "<<
GetName()<<
" Title= "<<
GetTitle()<<
" Option="<<option<<std::endl;
2956 began3DScene =
kTRUE;
2963 if (padsav) padsav->cd();
2992 if (color < 0) color = -color;
2999 if (bordersize <= 0) bordersize = 2;
3020 if (px1 < px2) {xl =
fX1; xt =
fX2; }
3021 else {xl =
fX2; xt =
fX1;}
3022 if (py1 > py2) {yl =
fY1; yt =
fY2;}
3023 else {yl =
fY2; yt =
fY1;}
3025 Double_t frameXs[7] = {}, frameYs[7] = {};
3029 frameXs[0] = xl; frameYs[0] = yl;
3030 frameXs[1] = xl + realBsX; frameYs[1] = yl + realBsY;
3031 frameXs[2] = frameXs[1]; frameYs[2] = yt - realBsY;
3032 frameXs[3] = xt - realBsX; frameYs[3] = frameYs[2];
3033 frameXs[4] = xt; frameYs[4] = yt;
3034 frameXs[5] = xl; frameYs[5] = yt;
3035 frameXs[6] = xl; frameYs[6] = yl;
3042 frameXs[0] = xl; frameYs[0] = yl;
3043 frameXs[1] = xl + realBsX; frameYs[1] = yl + realBsY;
3044 frameXs[2] = xt - realBsX; frameYs[2] = frameYs[1];
3045 frameXs[3] = frameXs[2]; frameYs[3] = yt - realBsY;
3046 frameXs[4] = xt; frameYs[4] = yt;
3047 frameXs[5] = xt; frameYs[5] = yl;
3048 frameXs[6] = xl; frameYs[6] = yl;
3181 ((
TPad*)obj)->PaintModified();
3193 began3DScene =
kTRUE;
3201 if (padsav) padsav->cd();
3222 if (!
gPad->IsBatch()) {
3225 if (option[0] ==
's') {
3230 if (style > 3000 && style < 4000) {
3236 if (style >= 3100 && style < 4000) {
3238 xb[0] =
x1; xb[1] =
x1; xb[2] =
x2; xb[3] =
x2;
3239 yb[0] = y1; yb[1] = y2; yb[2] = y2; yb[3] = y1;
3249 }
else if (style >= 4000 && style <= 4100) {
3274 }
else if (style >= 1000 && style <= 1999) {
3288 if (option[0] ==
's') {
3291 if (style0 >= 3100 && style0 < 4000) {
3293 xb[0] =
x1; xb[1] =
x1; xb[2] =
x2; xb[3] =
x2;
3294 yb[0] = y1; yb[1] = y2; yb[2] = y2; yb[3] = y1;
3300 if (option[0] ==
'l') {
3319 while ((obj =
next())) {
3321 if (obj == stop)
break;
3322 ((
TPad*)obj)->CopyBackgroundPixmap(x, y);
3323 ((
TPad*)obj)->CopyBackgroundPixmaps((
TPad*)obj, stop, x, y);
3342 Warning(
"TPad::PaintFillArea",
"Float_t signature is obsolete. Use Double_t signature.");
3365 n =
ClipPolygon(nn, xx, yy, nc, x, y,xmin,ymin,xmax,ymax);
3375 if (fillstyle >= 3100 && fillstyle < 4000) {
3382 if (!
gPad->IsBatch())
3429 static Double_t ang1[10] = {0., 10., 20., 30., 45.,5., 60., 70., 80., 90.};
3430 static Double_t ang2[10] = {180.,170.,160.,150.,135.,5.,120.,110.,100., 90.};
3432 Int_t fasi = FillStyle%1000;
3435 Int_t iAng1 = fasi%10;
3443 if (!
gPad->IsBatch()) {
3456 if (!
gPad->IsBatch()) {
3468 if (ang1[iAng1] != 5.)
PaintHatches(dy, ang1[iAng1], nn, xx, yy);
3469 if (ang2[iAng2] != 5.)
PaintHatches(dy, ang2[iAng2], nn, xx, yy);
3472 if (!
gPad->IsBatch()) {
3496 const Int_t maxnbi = 100;
3497 Double_t xli[maxnbi], xlh[2], ylh[2], xt1, xt2, yt1, yt2;
3498 Double_t ll,
x,
y,
x1,
x2, y1, y2,
a, b, xi, xip, xin, yi, yip;
3504 ratiox = 1/(rwxmax-rwxmin);
3505 ratioy = 1/(rwymax-rwymin);
3518 gPad->GetPadPar(x1p,y1p,x2p,y2p);
3527 for (i=1; i<=nn; i++) {
3528 x = wndc*ratiox*(xx[i-1]-rwxmin);
3529 y = hndc*ratioy*(yy[i-1]-rwymin);
3530 yrot = sina*x+cosa*
y;
3531 if (yrot > ymax) ymax = yrot;
3532 if (yrot < ymin) ymin = yrot;
3536 for (ycur=ymax; ycur>=
ymin; ycur=ycur-dy) {
3538 for (i=2; i<=nn+1; i++) {
3541 if (i == nn+1) i2=1;
3542 x1 = wndc*ratiox*(xx[i1-1]-rwxmin);
3543 y1 = hndc*ratioy*(yy[i1-1]-rwymin);
3544 x2 = wndc*ratiox*(xx[i2-1]-rwxmin);
3545 y2 = hndc*ratioy*(yy[i2-1]-rwymin);
3546 xt1 = cosa*x1-sina*y1;
3547 yt1 = sina*x1+cosa*y1;
3548 xt2 = cosa*x2-sina*y2;
3549 yt2 = sina*x2+cosa*y2;
3560 if ((yi <= ycur) && (ycur < yip)) {
3562 if (nbi >= maxnbi)
return;
3572 if (nbi >= maxnbi)
return;
3575 if (nbi >= maxnbi)
return;
3582 a = (yt1-yt2)/(xt1-xt2);
3583 b = (yt2*xt1-xt2*yt1)/(xt1-xt2);
3592 if ((xi <= xin) && (xin < xip) &&
3596 if (nbi >= maxnbi)
return;
3605 for (i=1; i<=
m; i++) {
3606 if (xli[i] < xli[i-1]) {
3614 if (inv == 0)
goto L50;
3620 if (nbi%2 != 0)
continue;
3622 for (i=1; i<=nbi; i=i+2) {
3624 xlh[0] = cosb*xli[i-1]-sinb*ycur;
3625 ylh[0] = sinb*xli[i-1]+cosb*ycur;
3626 xlh[1] = cosb*xli[i] -sinb*ycur;
3627 ylh[1] = sinb*xli[i] +cosb*ycur;
3629 xlh[0] = (xlh[0]/wndc)*(rwxmax-rwxmin)+rwxmin;
3630 ylh[0] = (ylh[0]/hndc)*(rwymax-rwymin)+rwymin;
3631 xlh[1] = (xlh[1]/wndc)*(rwxmax-rwxmin)+rwxmin;
3632 ylh[1] = (ylh[1]/hndc)*(rwymax-rwymin)+rwymin;
3633 gPad->PaintLine(xlh[0], ylh[0], xlh[1], ylh[1]);
3644 x[0] =
x1; x[1] =
x2; y[0] = y1; y[1] = y2;
3653 if (!
gPad->IsBatch())
3669 if (!
gPad->IsBatch())
3694 for (i=0;i<3;i++) temp[i] = p1[i];
3695 fView->WCtoNDC(temp, &xpad[0]);
3696 for (i=0;i<3;i++) temp[i] = p2[i];
3697 fView->WCtoNDC(temp, &xpad[3]);
3698 PaintLine(xpad[0],xpad[1],xpad[3],xpad[4]);
3712 for (i=0;i<3;i++) temp[i] = p1[i];
3713 fView->WCtoNDC(temp, &xpad[0]);
3714 for (i=0;i<3;i++) temp[i] = p2[i];
3715 fView->WCtoNDC(temp, &xpad[3]);
3716 PaintLine(xpad[0],xpad[1],xpad[3],xpad[4]);
3733 for (i=0; i<n-1; i++) {
3738 Int_t iclip =
Clip(&x[i],&y[i],xmin,ymin,xmax,ymax);
3745 if (iclip == 0 && i < n-2)
continue;
3746 if (!
gPad->IsBatch())
3779 if (option && (option[0] ==
'C')) mustClip =
kFALSE;
3782 Int_t i, i1=-1,
np=1, iclip=0;
3784 for (i=0; i < n-1; i++) {
3790 iclip =
Clip(&x[i],&y[i],xmin,ymin,xmax,ymax);
3798 if (iclip == 0 && i < n-2)
continue;
3799 if (!
gPad->IsBatch())
3824 if (!
gPad->IsBatch())
3830 for (
Int_t i=0; i<
n; i++) {
3849 for (
Int_t i = 1; i <
n; i++)
3868 for (i=0; i<
n; i++) {
3869 if (x[i] >= xmin && x[i] <= xmax && y[i] >= ymin && y[i] <= ymax) {
3872 if (i < n-1)
continue;
3874 if (
np == 0)
continue;
3875 if (!
gPad->IsBatch())
3899 for (i=0; i<
n; i++) {
3900 if (x[i] >= xmin && x[i] <= xmax && y[i] >= ymin && y[i] <= ymax) {
3903 if (i < n-1)
continue;
3905 if (
np == 0)
continue;
3906 if (!
gPad->IsBatch())
3924 if (!
gPad->IsBatch())
3937 if (!
gPad->IsBatch())
3950 if (!
gPad->IsBatch())
3967 if (!
gPad->IsBatch())
3995 if (
gPad == 0)
return 0;
4002 if (
this !=
gPad->GetCanvas()) {
4003 if (!((x >=
fX1 && x <=
fX2) && (y >=
fY1 && y <=
fY2)))
return 0;
4011 TPad *picked =
this;
4015 pickobj = &dummyLink;
4044 pick = ((
TPad*)obj)->
Pick(px, py, pickobj);
4049 }
else if (!
gROOT->GetEditorMode()) {
4056 if (dist == 0)
break;
4071 if (fView && !gotPrim) {
4108 while ((obj =
next()))
4136 ((
TPad*)
this)->SaveAs(filename);
4148 while ((obj =
next())) {
4310 filename = fs2.
Data();
4313 const char *opt_default=
"ps";
4315 Int_t lenfil = filename ? strlen(filename) : 0;
4316 TString opt = (!option) ? opt_default : option;
4338 if (strstr(opt,
"gif+")) {
4341 }
else if (strstr(opt,
"gif")) {
4344 }
else if (strstr(opt,
"png")) {
4347 }
else if (strstr(opt,
"jpg")) {
4350 }
else if (strstr(opt,
"tiff")) {
4353 }
else if (strstr(opt,
"xpm")) {
4356 }
else if (strstr(opt,
"bmp")) {
4366 Color_t hc =
gPad->GetCanvas()->GetHighLightColor();
4367 gPad->GetCanvas()->SetHighLightColor(-1);
4373 Info(
"Print",
"GIF file %s has been created", psname.
Data());
4375 gPad->GetCanvas()->SetHighLightColor(hc);
4379 Color_t hc =
gPad->GetCanvas()->GetHighLightColor();
4380 gPad->GetCanvas()->SetHighLightColor(-1);
4395 Info(
"Print",
"file %s has been created", psname.
Data());
4397 gPad->GetCanvas()->SetHighLightColor(hc);
4399 Warning(
"Print",
"Unsupported image format %s", psname.
Data());
4405 if (strstr(opt,
"cxx")) {
4411 if (strstr(opt,
"root")) {
4417 if (strstr(opt,
"xml")) {
4424 if (strstr(opt,
"svg")) {
4439 if ((h =
gROOT->GetPluginManager()->FindHandler(
"TVirtualPS",
"svg"))) {
4464 if (strstr(opt,
"tex")) {
4479 if ((h =
gROOT->GetPluginManager()->FindHandler(
"TVirtualPS",
"tex"))) {
4514 copen = psname.
EndsWith(
"(");
if (copen) psname[psname.
Length()-1] = 0;
4515 cclose = psname.
EndsWith(
")");
if (cclose) psname[psname.
Length()-1] = 0;
4516 copenb = psname.
EndsWith(
"[");
if (copenb) psname[psname.
Length()-1] = 0;
4517 ccloseb = psname.
EndsWith(
"]");
if (ccloseb) psname[psname.
Length()-1] = 0;
4521 if (copen || copenb) mustClose =
kFALSE;
4522 if (cclose || ccloseb) mustClose =
kTRUE;
4533 if (ratio < 1) pstype = 112;
4534 if (strstr(opt,
"Portrait")) pstype = 111;
4535 if (strstr(opt,
"Landscape")) pstype = 112;
4536 if (strstr(opt,
"eps")) pstype = 113;
4537 if (strstr(opt,
"Preview")) pstype = 113;
4545 if (strstr(opt,
"pdf") || strstr(opt,
"Title:")) {
4546 if ((h =
gROOT->GetPluginManager()->FindHandler(
"TVirtualPS",
"pdf"))) {
4552 if ((h =
gROOT->GetPluginManager()->FindHandler(
"TVirtualPS",
"image"))) {
4557 if ((h =
gROOT->GetPluginManager()->FindHandler(
"TVirtualPS",
"ps"))) {
4566 if (titlePos !=
kNPOS) {
4573 if (!strstr(opt,
"pdf") || image) {
4597 if (titlePos !=
kNPOS) {
4603 Info(
"Print",
"Current canvas added to %s file %s", opt.
Data(), psname.
Data());
4625 if ((x1 >= x2) || (y1 >= y2)) {
4626 Error(
"Range",
"illegal world coordinates range: x1=%f, y1=%f, x2=%f, y2=%f",x1,y1,x2,y2);
4635 if (
fX1 == x1 &&
fY1 == y1 &&
fX2 == x2 &&
fY2 == y2)
return;
4663 if ((xmin >= xmax) || (ymin >= ymax)) {
4664 Error(
"RangeAxis",
"illegal axis coordinates range: xmin=%f, ymin=%f, xmax=%f, ymax=%f",
4665 xmin, ymin, xmax, ymax);
4685 if (obj == fView) fView = 0;
4717 while ((obj =
next())) {
4728 if (h1f) h1f->
DrawCopy(
"sameaxis");
4747 if (padsav) padsav->
cd();
4877 if (
this ==
gPad->GetCanvas()) {
4909 fYtoPixelk = rounding + -pyrange - pyrange*fY1/yrange;
4930 while ((obj =
next())) {
4936 if (
gPad->IsBatch())
4954 Warning(
"ResizePad",
"Inf/NaN propagated to the pad. Check drawn objects.");
4955 if (w <= 0 || w > 10000) {
4956 Warning(
"ResizePad",
"%s width changed from %d to %d\n",
GetName(),w,10);
4959 if (h <= 0 || h > 10000) {
4960 Warning(
"ResizePad",
"%s height changed from %d to %d\n",
GetName(),h,10);
4974 if (padsav ==
this) {
5008 Int_t lenfil = filename ? strlen(filename) : 0;
5072 const char *cname =
GetName();
5073 Int_t nch = strlen(cname);
5075 strlcpy(lcname,cname,10);
5076 for (
Int_t k=1;k<=nch;k++) {
if (lcname[nch-k] ==
' ') lcname[nch-k] = 0;}
5077 if (lcname[0] == 0) {
5078 if (
this ==
gPad->GetCanvas()) {strlcpy(lcname,
"c1",10); nch = 2;}
5079 else {strlcpy(lcname,
"pad",10); nch = 3;}
5085 if (
this !=
gPad->GetCanvas()) {
5086 out <<
" "<<std::endl;
5087 out <<
"// ------------>Primitives in pad: "<<
GetName()<<std::endl;
5089 out<<
" TPad *"<<cname<<
" = new TPad("<<quote<<
GetName()<<quote<<
", "<<quote<<
GetTitle()
5096 out<<
" "<<cname<<
"->Draw();"<<std::endl;
5097 out<<
" "<<cname<<
"->cd();"<<std::endl;
5099 out<<
" "<<cname<<
"->Range("<<
fX1<<
","<<
fY1<<
","<<
fX2<<
","<<
fY2<<
");"<<std::endl;
5104 static Int_t viewNumber = 0;
5105 out<<
" TView *view"<<++viewNumber<<
" = TView::CreateView(1);"<<std::endl;
5106 out<<
" view"<<viewNumber<<
"->SetRange("<<rmin[0]<<
","<<rmin[1]<<
","<<rmin[2]<<
","
5107 <<rmax[0]<<
","<<rmax[1]<<
","<<rmax[2]<<
");"<<std::endl;
5112 out<<
" "<<cname<<
"->SetFillColor(ci);" << std::endl;
5114 out<<
" "<<cname<<
"->SetFillColor("<<
GetFillColor()<<
");"<<std::endl;
5117 out<<
" "<<cname<<
"->SetFillStyle("<<
GetFillStyle()<<
");"<<std::endl;
5120 out<<
" "<<cname<<
"->SetBorderMode("<<
GetBorderMode()<<
");"<<std::endl;
5123 out<<
" "<<cname<<
"->SetBorderSize("<<
GetBorderSize()<<
");"<<std::endl;
5126 out<<
" "<<cname<<
"->SetLogx();"<<std::endl;
5129 out<<
" "<<cname<<
"->SetLogy();"<<std::endl;
5132 out<<
" "<<cname<<
"->SetLogz();"<<std::endl;
5135 out<<
" "<<cname<<
"->SetGridx();"<<std::endl;
5138 out<<
" "<<cname<<
"->SetGridy();"<<std::endl;
5141 out<<
" "<<cname<<
"->SetTickx("<<
GetTickx()<<
");"<<std::endl;
5144 out<<
" "<<cname<<
"->SetTicky("<<
GetTicky()<<
");"<<std::endl;
5147 out<<
" "<<cname<<
"->SetTheta("<<
GetTheta()<<
");"<<std::endl;
5150 out<<
" "<<cname<<
"->SetPhi("<<
GetPhi()<<
");"<<std::endl;
5153 out<<
" "<<cname<<
"->SetLeftMargin("<<
GetLeftMargin()<<
");"<<std::endl;
5156 out<<
" "<<cname<<
"->SetRightMargin("<<
GetRightMargin()<<
");"<<std::endl;
5159 out<<
" "<<cname<<
"->SetTopMargin("<<
GetTopMargin()<<
");"<<std::endl;
5162 out<<
" "<<cname<<
"->SetBottomMargin("<<
GetBottomMargin()<<
");"<<std::endl;
5168 out<<
" "<<cname<<
"->SetFrameFillColor(ci);" << std::endl;
5181 out<<
" "<<cname<<
"->SetFrameLineColor(ci);" << std::endl;
5201 out<<
" "<<cname<<
"->SetFrameFillColor(ci);" << std::endl;
5203 out<<
" "<<cname<<
"->SetFrameFillColor("<<frame->
GetFillColor()<<
");"<<std::endl;
5206 out<<
" "<<cname<<
"->SetFrameFillStyle("<<frame->
GetFillStyle()<<
");"<<std::endl;
5209 out<<
" "<<cname<<
"->SetFrameLineStyle("<<frame->
GetLineStyle()<<
");"<<std::endl;
5214 out<<
" "<<cname<<
"->SetFrameLineColor(ci);" << std::endl;
5216 out<<
" "<<cname<<
"->SetFrameLineColor("<<frame->
GetLineColor()<<
");"<<std::endl;
5219 out<<
" "<<cname<<
"->SetFrameLineWidth("<<frame->
GetLineWidth()<<
");"<<std::endl;
5222 out<<
" "<<cname<<
"->SetFrameBorderMode("<<frame->
GetBorderMode()<<
");"<<std::endl;
5225 out<<
" "<<cname<<
"->SetFrameBorderSize("<<frame->
GetBorderSize()<<
");"<<std::endl;
5233 while ((obj =
next())) {
5235 if (!strcmp(obj->
GetName(),
"Graph")) ((
TGraph*)obj)->SetName(
Form(
"Graph%d",grnum++));
5238 out<<
" "<<cname<<
"->Modified();"<<std::endl;
5240 if (padsav) padsav->
cd();
5253 Error(
"SetAspectRatio",
"cannot fix aspect ratio, height of pad is 0");
5277 while ((obj =
next())) {
5291 if (fstyle == 0) fstyle = 4000;
5304 delete fView; fView=0;
5317 delete fView; fView=0;
5327 delete fView; fView=0;
5381 SetPad(xlow, ylow, xup, yup);
5389 if (!view)
delete fView;
5462 x1 = x2 = y1 = y2 = 0;
5464 if (aBBox.
fX<bBBox.
fX) {
5480 else if (mode ==
'y') {
5481 if (aBBox.
fY<bBBox.
fY) {
5519 : fa(0), fb(0), fdist(0), fdir(
' ')
5523 : fa(a), fb(b), fdist(dist), fdir(direction)
5549 std::vector<dField> curDist;
5550 std::vector<dField> otherDist;
5560 Int_t dSizeArrow = 12;
5562 movedX = movedY =
false;
5564 if (mode !=
'i') resize =
true;
5566 TPad *is_pad =
dynamic_cast<TPad *
>( object );
5571 static TPad * tmpGuideLinePad;
5574 if (tmpGuideLinePad) {
5575 if (
object == tmpGuideLinePad) {
5576 tmpGuideLinePad->
Delete();
5577 tmpGuideLinePad = 0;
5580 tmpGuideLinePad->
Delete();
5581 tmpGuideLinePad = 0;
5585 prims =
gPad->GetListOfPrimitives();
5592 if (!tmpGuideLinePad){
5593 tmpGuideLinePad =
new TPad(
"tmpGuideLinePad",
"tmpGuideLinePad", 0, 0, 1, 1);
5595 gPad->GetRange(x1, y1, x2, y2);
5596 tmpGuideLinePad->
Range(x1, y1, x2, y2);
5599 tmpGuideLinePad->
Draw();
5600 tmpGuideLinePad->
cd();
5601 gPad->GetRange(x1, y1, x2, y2);
5603 if (cling) threshold = 7;
5616 MX =
gPad->GetX1() + 0.5 * (
gPad->GetX2()-
gPad->GetX1());
5617 MY =
gPad->GetY1() + 0.5 * (
gPad->GetY2()-
gPad->GetY1());
5618 pMX =
gPad->XtoPixel(MX);
5619 pMY =
gPad->YtoPixel(MY);
5622 if (cling && (!resize)) {
5634 if (cling && (!resize)) {
5646 for (
UInt_t i = 0; i<
n; i++) {
5652 if (cling && (!resize)) {
5664 if (cling && (!resize)) {
5679 for (
UInt_t i = 0; i<
n; i++) {
5683 for (
UInt_t j = i+1; j<
n; j++) {
5691 dField abDist = dField();
5694 if ((b != cur)&&(a != cur)) otherDist.push_back(abDist);
5695 else curDist.push_back(abDist);
5699 dField abDist = dField();
5702 if ((b != cur)&&(a != cur)) otherDist.push_back(abDist);
5703 else curDist.push_back(abDist);
5711 for (
UInt_t i = 0; i<curDist.size(); i++) {
5712 for (
UInt_t j = 0; j<otherDist.size(); j++) {
5713 if ((curDist[i].fdir == otherDist[j].fdir)&&(otherDist[j].fdir==
'x')&&(
TMath::Abs(curDist[i].fdist-otherDist[j].fdist)<threshold)) {
5714 if (cling && (!movedX) && (!resize)) {
5720 DrawDist(curDist[i].fa->GetBBox(), curDist[i].fb->GetBBox(),
'x');
5721 DrawDist(otherDist[j].fa->GetBBox(), otherDist[j].fb->GetBBox(),
'x');
5723 if ((curDist[i].fdir == otherDist[j].fdir)&&(otherDist[j].fdir==
'y')&&(
TMath::Abs(curDist[i].fdist-otherDist[j].fdist)<threshold)) {
5724 if (cling && (!movedY) && (!resize)) {
5730 DrawDist(curDist[i].fa->GetBBox(), curDist[i].fb->GetBBox(),
'y');
5731 DrawDist(otherDist[j].fa->GetBBox(), otherDist[j].fb->GetBBox(),
'y');
5734 for (
UInt_t j = i; j<curDist.size(); j++) {
5736 if ((curDist[i].fdir == curDist[j].fdir)&&(curDist[j].fdir==
'x')&&(
TMath::Abs(curDist[i].fdist-curDist[j].fdist)<threshold)) {
5737 if (cling && (!movedX) && (!resize)) {
5742 DrawDist(curDist[i].fa->GetBBox(), curDist[i].fb->GetBBox(),
'x');
5743 DrawDist(curDist[j].fa->GetBBox(), curDist[j].fb->GetBBox(),
'x');
5746 if ((curDist[i].fdir == curDist[j].fdir)&&(curDist[j].fdir==
'y')&&(
TMath::Abs(curDist[i].fdist-curDist[j].fdist)<threshold)) {
5747 if (cling && (!movedY) && (!resize)) {
5752 DrawDist(curDist[i].fa->GetBBox(), curDist[i].fb->GetBBox(),
'y');
5753 DrawDist(curDist[j].fa->GetBBox(), curDist[j].fb->GetBBox(),
'y');
5760 for (
UInt_t i = 0; i<
n; i++) {
5762 if (a && (cur != a)) {
5775 gPad->PixeltoX(aBBox.
fX+aBBox.
fWidth),
gPad->PixeltoY(aBBox.
fY-dSizeArrow-
gPad->VtoPixel(0)), 0.01,
"<|>");
5817 if (tmpGuideLinePad) {
5820 tmpGuideLinePad->
Delete();
5821 tmpGuideLinePad = 0;
5888 if (text && strlen(text))
5904 void TPad::Streamer(
TBuffer &b)
5907 Int_t nch, nobjects;
5927 while ((obj =
next())) {
5946 TObject::Streamer(b);
5947 TAttLine::Streamer(b);
5948 TAttFill::Streamer(b);
5949 b >> single;
fX1 = single;
5950 b >> single;
fY1 = single;
5951 b >> single;
fX2 = single;
5952 b >> single;
fY2 = single;
5955 TAttPad::Streamer(b);
5957 TVirtualPad::Streamer(b);
5958 TAttPad::Streamer(b);
5959 b >> single;
fX1 = single;
5960 b >> single;
fY1 = single;
5961 b >> single;
fX2 = single;
5962 b >> single;
fY2 = single;
5989 b >> single;
fWNDC = single;
5990 b >> single;
fHNDC = single;
5995 b >> single;
fUxmin = single;
5996 b >> single;
fUymin = single;
5997 b >> single;
fUxmax = single;
5998 b >> single;
fUymax = single;
6000 TVirtualPad::Streamer(b);
6001 TAttPad::Streamer(b);
6060 char drawoption[64];
6061 for (
Int_t i = 0; i < nobjects; i++) {
6086 b >> single;
fTheta = single;
6087 b >> single;
fPhi = single;
6151 while ((obj =
next())) {
6170 if (fFrame) fFrame->UseCurrentStyle();
6233 if (strlen(emode))
gROOT->SetEditorMode(emode);
6234 if (
gROOT->GetEditorMode() == 0 && strlen(pname) > 2)
gROOT->SetEditorMode(&pname[1]);
6238 TObject *oldlast =
gPad->GetListOfPrimitives()->Last();
6241 Bool_t hasname = strlen(pname) > 0;
6242 if (!pname[0] && !emode[0]) testlast =
kTRUE;
6243 if (testlast)
gROOT->SetEditorMode();
6245 if (
gROOT->GetEditorMode() == 0) {
6248 if (obj)
return obj;
6251 obj =
gPad->GetListOfPrimitives()->Last();
6252 if (obj != oldlast)
return obj;
6273 if (
gPad->IsBatch())
return 0;
6274 return (
TObject*)
gROOT->ProcessLineFast(
Form(
"new TGToolTip((TBox*)0x%lx,\"%s\",%d)",
6285 gROOT->ProcessLineFast(
Form(
"delete (TGToolTip*)0x%lx", (
Long_t)tip));
6296 gROOT->ProcessLineFast(
Form(
"((TGToolTip*)0x%lx)->Reset((TPad*)0x%lx)",
6307 gROOT->ProcessLineFast(
Form(
"((TGToolTip*)0x%lx)->Hide()",(
Long_t)tip));
6315 ::Info(
"TPad::x3d()",
"Fn is depreciated - use TPad::GetViewer3D() instead");
6318 if (!type || !type[0]) {
6335 if ( (!type || !type[0] || (strstr(type,
"gl") && !strstr(type,
"ogl"))) && !
fCanvas->
UseGL())
6338 if (type && type[0]) {
6363 if (!strstr(type,
"pad")) {
6367 Warning(
"TPad::CreateViewer3D",
"Cannot create 3D viewer of type: %s", type);
6373 if (strstr(type,
"gl") && !strstr(type,
"ogl"))
6376 createdExternal =
kTRUE;
6392 if (createdExternal) {
6429 Emit(
"RecordPave(const TObject*)", (
Long_t)obj);
6437 Emit(
"RecordLatex(const TObject*)", (
Long_t)obj);
Double_t PadtoY(Double_t y) const
Convert y from pad to Y.
virtual TCanvasImp * GetCanvasImp() const
Get canvas implementation pointer if any.
Double_t PadtoX(Double_t x) const
Convert x from pad to X.
virtual TObject * GetSelected() const
Get selected.
Int_t GetFirst() const
Return first bin on the axis i.e.
virtual const char * GetTitle() const
Returns title of object.
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.
Int_t GetNdata()
Return the number of data members of this class Note that in case the list of data members is not yet...
virtual Style_t GetLineStyle() const
virtual Style_t GetFillStyle() const
virtual void SetLineWidth(Width_t lwidth)
Option_t * GetOption() const
virtual void SetOpacity(Int_t percent)=0
void FeedbackMode(Bool_t set)
Turn rubberband feedback mode on or off.
double dist(Rotation3D const &r1, Rotation3D const &r2)
virtual 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)
Set all pad parameters.
TList * GetListOfBases()
Return list containing the TBaseClass(es) of a class.
virtual void SetAlpha(Float_t a)
static Int_t DecreaseDirLevel()
Decrease the indentation level for ls().
virtual void DrawBox(Double_t x1, Double_t y1, Double_t x2, Double_t y2)=0
virtual Bool_t ProcessEvents()
Process pending events (GUI, timers, sockets).
Int_t GetEventX() const
Get X event.
static void PolyLine(Int_t event, Int_t px, Int_t py, Int_t mode)
Create a new PolyLine in gPad.
Double_t GetUxmin() const
void PaintLineNDC(Double_t u1, Double_t v1, Double_t u2, Double_t v2)
Paint line in normalized coordinates.
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
virtual void DrawClassObject(const TObject *obj, Option_t *option="")
Draw class inheritance tree of the class to which obj belongs.
void SetPadGridX(Bool_t gridx)
virtual Float_t GetTextAngle() const
TList * fPrimitives
Pointer to mother canvas.
virtual TObject * GetPrimitive(const char *name) const
Get primitive.
virtual void ResizePad(Option_t *option="")
Compute pad conversion coefficients.
virtual void Draw(Option_t *option="")
Draw this pavetext with its current attributes.
virtual TCanvas * GetCanvas() const
Double_t Floor(Double_t x)
virtual void SetCursor(ECursor cursor)
Set cursor.
Bool_t GetPadGridX() const
void SetPadLeftMargin(Float_t margin=0.1)
Int_t GetFrameBorderMode() const
Double_t GetAbsWNDC() const
ABC describing GUI independent main window (with menubar, scrollbars and a drawing area)...
virtual Double_t GetBinContent(Int_t bin) const
Return content of bin number bin.
virtual void DrawPolyLineNDC(Int_t n, const Double_t *u, const Double_t *v)=0
virtual TBox * DrawBox(Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Draw this box with new coordinates.
virtual void SetMaximum(Double_t maximum=-1111)
This class displays a legend box (TPaveText) containing several legend entries.
The Histogram stack class.
R__EXTERN Int_t gErrorIgnoreLevel
virtual Font_t GetTextFont() const
Color_t GetFrameLineColor() const
virtual void DrawCrosshair()
Function called to draw a crosshair in the canvas.
virtual void SetLimits(Double_t xmin, Double_t xmax)
Width_t GetFrameBorderSize() const
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
virtual TBox * AddBox(Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Add a new graphics box to this pavetext.
virtual void SetBatch(Bool_t batch=kTRUE)
Set pad in batch mode.
ClassImp(TSeqCollection) Int_t TSeqCollection TIter next(this)
Return index of object in collection.
Int_t GetNmethods()
Return the number of methods of this class Note that in case the list of methods is not yet created...
TVirtualPadPainter * GetCanvasPainter()
Access and (probably) creation of pad painter.
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Computes distance from point (px,py) to the object.
virtual void ls(Option_t *option="") const
List (ls) all objects in this collection.
virtual void SetDirectory(TDirectory *dir)
By default when an histogram is created, it is added to the list of histogram objects in the current ...
virtual void Paint(Option_t *option="")
Paint all primitives in pad.
virtual Int_t GetMaximumBin() const
Return location of bin with maximum value in the range.
RooArgList L(const RooAbsArg &v1)
virtual Int_t GetEventX() const
Get X event.
virtual TLine * AddLine(Double_t x1=0, Double_t y1=0, Double_t x2=0, Double_t y2=0)
Add a new graphics line to this pavetext.
Int_t XtoAbsPixel(Double_t x) const
All ROOT classes may have RTTI (run time type identification) support added.
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 GetAbsYlowNDC() const
TVirtualPad * GetPadSave() const
Int_t GetPadTickX() const
void PaintPadFrame(Double_t xmin, Double_t ymin, Double_t xmax, Double_t ymax)
Paint histogram/graph frame.
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 SetVertical(Bool_t vert=kTRUE)
Set pad vertical (default) or horizontal.
TClass * GetClassPointer(Bool_t load=kTRUE)
Get pointer to the base class TClass.
R__EXTERN TStyle * gStyle
virtual Int_t GetDimension() const
void PaintFillArea(Int_t n, Float_t *x, Float_t *y, Option_t *option="")
Double_t distance(const TPoint2 &p1, const TPoint2 &p2)
virtual void SetName(const char *name)
Change (i.e.
virtual void RangeChanged()
virtual void SetSelected(TObject *obj)
Set selected.
virtual void Draw(Option_t *option="")
Draw this legend with its current attributes.
Color_t GetTitleFillColor() const
Int_t GetBorderSize() const
static void SaveColor(std::ostream &out, Int_t ci)
Save a color with index > 228 as a C++ statement(s) on output stream out.
Width_t GetPadBorderSize() const
void PaintPolyLineNDC(Int_t n, Double_t *x, Double_t *y, Option_t *option="")
Paint polyline in CurrentPad NDC coordinates.
TH1F * DrawFrame(Double_t xmin, Double_t ymin, Double_t xmax, Double_t ymax, const char *title="")
Draw an empty pad frame with X and Y axis.
virtual void DrawPolyMarker(Int_t n, Float_t *x, Float_t *y)=0
virtual void SetBBoxCenter(const TPoint &p)
Set center of the Pad.
virtual void SetFixedAspectRatio(Bool_t fixed=kTRUE)
Fix pad aspect ratio to current value if fixed is true.
virtual UInt_t GetWw() const
Get Ww.
virtual void SetBorderMode(Short_t bordermode)
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
A TMultiGraph is a collection of TGraph (or derived) objects.
virtual ~TPad()
Pad destructor.
virtual void AddFirst(TObject *obj)
Add object at the beginning of the list.
virtual Bool_t IsRetained() const
Is pad retained ?
virtual TText * AddText(Double_t x1, Double_t y1, const char *label)
Add a new Text line to this pavetext at given coordinates.
Buffer base class used for serializing objects.
virtual Float_t GetTextSize() const
virtual void CopyPixmap()
Copy the pixmap of the pad to the canvas.
Bool_t HasFixedAspectRatio() const
Double_t GetUymax() const
Double_t GetAbsXlowNDC() const
TPluginHandler * FindHandler(const char *base, const char *uri=0)
Returns the handler if there exists a handler for the specified URI.
virtual Double_t GetBinLowEdge(Int_t bin) const
Return low edge of bin.
Int_t UtoPixel(Double_t u) const
static const char * filename()
virtual void SetMinimum(Double_t minimum=-1111)
virtual Int_t CheckByteCount(UInt_t startpos, UInt_t bcnt, const TClass *clss)=0
TList * GetListOfDataMembers(Bool_t load=kTRUE)
Return list containing the TDataMembers of a class.
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.
virtual void GetRangeAxis(Double_t &xmin, Double_t &ymin, Double_t &xmax, Double_t &ymax)
Return pad axis coordinates range.
double inv(double x)
For comparisons.
Int_t LoadPlugin()
Load the plugin library for this handler.
void PaintBorder(Color_t color, Bool_t tops)
Paint the pad border.
void SetTitleFont(Style_t font=62, Option_t *axis="X")
virtual void DestroyDrawable()=0
1-D histogram with a float per channel (see TH1 documentation)}
virtual Double_t GetNormFactor() const
virtual Bool_t OpaqueMoving() const
Is pad moving in opaque mode ?
Short_t Min(Short_t a, Short_t b)
virtual void Update()
Update pad.
void ToLower()
Change string to lower-case.
virtual void SetBBoxY2(const Int_t y)=0
virtual Int_t CreateDrawable(UInt_t w, UInt_t h)=0
virtual void PaintModified()
Traverse pad hierarchy and (re)paint only modified pads.
R__EXTERN TVirtualMutex * gROOTMutex
virtual void Draw(Option_t *option="")
Default Draw method for all objects.
virtual void SetX1(Double_t x1)
virtual void SetFillStyle(Style_t fstyle)
virtual void SetBBoxCenterX(const Int_t x)
Set X coordinate of the center of the Pad.
virtual TObject * FindObject(const char *name) const
Find an object in this list using its name.
virtual void UseCurrentStyle()
Set current style settings in this object This function is called when either TCanvas::UseCurrentStyl...
virtual void SetLineWidth(Width_t lwidth)=0
TH1F * GetHistogram() const
Returns a pointer to the histogram used to draw the axis Takes into account the two following cases...
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.
TString & Prepend(const char *cs)
virtual void Print(const char *filename="") const
Save Pad contents in a file in one of various formats.
virtual void Modify()
Change current line attributes if necessary.
virtual void SetX2(Double_t x2)
Int_t GetHatchesLineWidth() const
virtual Short_t GetBorderMode() const
UInt_t GetWindowHeight() const
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Double_t YtoPad(Double_t y) const
Convert y from Y to pad.
Long_t ExecPlugin(int nargs, const T &...params)
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
Int_t GetMaxIndex(Int_t dim) const
Return maximum index for array dimension "dim".
void SetPadBottomMargin(Float_t margin=0.1)
virtual TObject * At(Int_t idx) const
Returns the object at position idx. Returns 0 if idx is out of range.
virtual TVirtualPad * cd(Int_t subpadnumber=0)=0
Bool_t IsModified() const
virtual void RecursiveRemove(TObject *obj)
Recursively remove object from a pad and its sub-pads.
void SetPadBorderSize(Width_t size=1)
virtual void SetTopMargin(Float_t topmargin)
Set Pad top margin in fraction of the pad height.
virtual Bool_t IsEditable() const =0
virtual void DrawBox(Double_t x1, Double_t y1, Double_t x2, Double_t y2, EBoxMode mode)=0
virtual Double_t GetX1() const =0
virtual void AddLast(TObject *obj)
Add object at the end of the list.
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
Width_t GetTitleBorderSize() const
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...
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.
TString & Replace(Ssiz_t pos, Ssiz_t n, const char *s)
virtual void SetToolTipText(const char *text, Long_t delayms=1000)
Set tool tip text associated with this pad.
void SetOptLogz(Int_t logz=1)
virtual Style_t GetFillStyle() const =0
virtual void SaveImage(TVirtualPad *pad, const char *fileName, Int_t type) const =0
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.
const char * Data() const
virtual void SetTextFont(Font_t tfont=62)
void SetClickSelected(TObject *obj)
void SetTitleBorderSize(Width_t size=2)
virtual TVirtualViewer3D * GetViewer3D(Option_t *type="")
Create/obtain handle to 3D viewer.
Provides 3D viewer interface (TVirtualViewer3D) support on a pad.
virtual void DrawTextNDC(Double_t u, Double_t v, const char *text, ETextMode mode)=0
TVirtualPad * cd(Int_t subpadnumber=0)
Set Current pad.
static const double x2[5]
Double_t GetYlowNDC() const
virtual Short_t GetTextAlign() const
Float_t GetTopMargin() const
Float_t GetRightMargin() const
Int_t GetEvent() const
Get Event.
virtual TObject * After(const TObject *obj) const
Returns the object after object obj.
void PaintDate()
Paint the current date and time if the option date is on.
Float_t GetBottomMargin() const
virtual void Cleared(TVirtualPad *pad)
Emit pad Cleared signal.
virtual Int_t GetEvent() const
Get Event.
virtual void Close(Option_t *option="")
Delete all primitives in pad and pad itself.
virtual void Sleep(UInt_t milliSec)
Sleep milliSec milli seconds.
virtual const char * GetName() const =0
Returns name of object.
TFrame * GetFrame()
Get frame.
Float_t GetPadBottomMargin() const
virtual Option_t * GetDrawOption() const
Get option used by the graphics system to draw this object.
virtual void DrawLineNDC(Double_t u1, Double_t v1, Double_t u2, Double_t v2)=0
Color_t GetTitleTextColor() const
virtual Int_t GetEventY() const
Get Y event.
The TNamed class is the base class for all named ROOT classes.
void HighLight(Color_t col=kRed, Bool_t set=kTRUE)
Highlight pad.
virtual void Draw(Option_t *option="")
Draw this arrow with its current attributes.
virtual Width_t GetLineWidth() const =0
static Int_t GetMaxPickDistance()
Static function (see also TPad::SetMaxPickDistance)
void PaintTextNDC(Double_t u, Double_t v, const char *text)
Paint text in CurrentPad NDC coordinates.
UChar_t mod R__LOCKGUARD2(gSrvAuthenticateMutex)
virtual void Modify()
Change current fill area attributes if necessary.
virtual Color_t GetTextColor() const
virtual void ExecuteEventAxis(Int_t event, Int_t px, Int_t py, TAxis *axis)
Execute action corresponding to one event for a TAxis object (called by TAxis::ExecuteEvent.) This member function is called when an axis is clicked with the locator.
TCanvas * fCanvas
pointer to mother of the list
virtual void SetCrosshair(Int_t crhair=1)
Set crosshair active/inactive.
Double_t Log10(Double_t x)
virtual TLegend * BuildLegend(Double_t x1=0.5, Double_t y1=0.67, Double_t x2=0.88, Double_t y2=0.88, const char *title="")
Build a legend from the graphical objects in the pad.
virtual void DrawText(Double_t x, Double_t y, const char *text, ETextMode mode)=0
static double p2(double t, double a, double b, double c)
virtual void SaveAs(const char *filename="", Option_t *option="") const
Save Pad contents in a file in one of various formats.
virtual TObjLink * LastLink() const
void SetPadTickX(Int_t tickx)
Bool_t IsRetained() const
Is pad retained ?
virtual void SetBBoxX1(const Int_t x)
Set lefthandside of BoundingBox to a value (resize in x direction on left)
static const double x4[22]
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Compute distance from point px,py to a box.
virtual void SetLineStyle(Style_t lstyle)=0
virtual void SetMarkerColor(Color_t mcolor=1)
TString & Append(const char *cs)
void SetSelectedPad(TPad *pad)
static void DrawColorTable()
Static function to Display Color Table in a pad.
virtual Option_t * GetOption() const
Double_t GetHatchesSpacing() const
Base class for several text objects.
Abstract 3D shapes viewer.
void SetTitleTextColor(Color_t color=1)
UInt_t GetWw() const
Get Ww.
Int_t GetEventY() const
Get Y event.
Bool_t OpaqueMoving() const
Is pad moving in opaque mode ?
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual void SetLogx(Int_t value=1)
Set Lin/Log scale for X.
virtual TH1 * DrawCopy(Option_t *option="", const char *name_postfix="_copy") const
Copy this histogram and Draw in the current pad.
virtual Rectangle_t GetBBox()=0
virtual void SetFillColor(Color_t fcolor)=0
virtual void RedrawAxis(Option_t *option="")
Redraw the frame axis Redrawing axis may be necessary in case of superimposed histograms when one or ...
TVirtualPad is an abstract base class for the Pad and Canvas classes.
void SaveSource(const char *filename="", Option_t *option="")
Save primitives in this canvas as a C++ macro file.
virtual TPad * Pick(Int_t px, Int_t py, TObjLink *&pickobj)
Search for an object at pixel position px,py.
virtual TObject * GetParent() const
Int_t YtoAbsPixel(Double_t y) const
virtual void Draw(Option_t *option="")
Draw Pad in Current pad (re-parent pad if necessary).
Double_t GetXlowNDC() const
virtual void Text(Double_t x, Double_t y, const char *string)=0
R__EXTERN TPluginManager * gPluginMgr
virtual void SetEditable(Bool_t mode=kTRUE)
Set pad editable yes/no If a pad is not editable:
virtual void XYtoAbsPixel(Double_t x, Double_t y, Int_t &xpixel, Int_t &ypixel) const
R__EXTERN Int_t(* gThreadXAR)(const char *xact, Int_t nb, void **ar, Int_t *iret)
void Emit(const char *signal)
Acitvate signal without args.
virtual void SetTextAlign(Short_t align=11)
virtual Short_t GetBorderSize() const =0
virtual Int_t GetCanvasID() const
Get canvas identifier.
static Bool_t SupportAlpha()
Static function returning "true" if transparency is supported.
const char * GetName() const
Returns name of object.
virtual Color_t GetHighLightColor() const
Get highlight color.
virtual void CopyPixmaps()
Copy the sub-pixmaps of the pad to the canvas.
Style_t GetFrameFillStyle() const
void SetOptLogx(Int_t logx=1)
Int_t GetPadTickY() const
Int_t GetOptTitle() const
virtual TVirtualPad * GetVirtCanvas() const
Get virtual canvas.
Float_t GetPadRightMargin() const
void PaintPolyLine(Int_t n, Float_t *x, Float_t *y, Option_t *option="")
Paint polyline in CurrentPad World coordinates.
virtual void AddExec(const char *name, const char *command)
Add a new TExec object to the list of Execs.
virtual void SetLineColor(Color_t lcolor)
virtual Int_t UtoPixel(Double_t u) const =0
virtual void Delete(Option_t *option="")
Delete this object.
Using a TBrowser one can browse all ROOT objects.
TObject * fPadView3D
free pointer
virtual Double_t GetY2() const =0
static Int_t GetColorBright(Int_t color)
Static function: Returns the bright color number corresponding to n If the TColor object does not exi...
virtual void SetRange(Int_t first=0, Int_t last=0)
Set the viewing range for the axis from bin first to last.
TVirtualPad * GetSelectedPad() const
Get selected pad.
virtual TObject * FindObject(const char *name) const
Search if object named name is inside this pad or in pads inside this pad.
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Execute action corresponding to one event.
virtual void SetDoubleBuffer(Int_t mode=1)
Set double buffer mode ON or OFF.
virtual void SetAttLinePS(Color_t color, Style_t style, Width_t lwidth)
Set postscript line attributes.
void SetPadBorderMode(Int_t mode=1)
virtual void SetBottomMargin(Float_t bottommargin)
Set Pad bottom margin in fraction of the pad height.
virtual void DrawPolyLine(Int_t n, const Double_t *x, const Double_t *y)=0
Bool_t EndsWith(const char *pat, ECaseCompare cmp=kExact) const
Return true if string ends with the specified string.
virtual void SetCursor(ECursor cursor)
Set cursor type.
virtual void DeleteToolTip(TObject *tip)
Delete tool tip object.
virtual void ShowGuidelines(TObject *object, const Int_t event, const char mode= 'i', const bool cling=true)
Shows lines to indicate if a TAttBBox2D object is aligned to the center or to another object...
Class to manage histogram axis.
R__EXTERN TSystem * gSystem
virtual void CloseToolTip(TObject *tip)
Hide tool tip.
virtual void Draw(Option_t *option="")
Draw this histogram with options.
void SetPadColor(Color_t color=19)
TPaveLabel title(3, 27.1, 15, 28.7,"ROOT Environment and Tools")
virtual void SetFillColor(Color_t fcolor)
virtual void SetBBoxX1(const Int_t x)=0
virtual void Range(Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Set world coordinate system for the pad.
virtual Int_t XtoAbsPixel(Double_t x) const =0
virtual void SetAttFillPS(Color_t color, Style_t style)
Set postscript fill area attributes.
virtual Double_t GetBinUpEdge(Int_t bin) const
Return up edge of bin.
virtual void DrawLine(Double_t x1, Double_t y1, Double_t x2, Double_t y2)=0
virtual void DeleteExec(const char *name)
Remove TExec name from the list of Execs.
virtual TPoint GetBBoxCenter()
Return the center of the Pad as TPoint in pixels.
virtual Int_t GetValue(const char *name, Int_t dflt)
Returns the integer value for a resource.
virtual const char * ClassName() const
Returns name of class to which the object belongs.
virtual Bool_t HasCrosshair() const
Return kTRUE if the crosshair has been activated (via SetCrosshair).
virtual void ls(Option_t *option="") const
List all primitives in pad.
virtual TObject * Remove(TObject *obj)
Remove object from the list.
virtual void UseCurrentStyle()
Force a copy of current style for all objects in pad.
virtual void SetTextAngle(Float_t tangle=0)
virtual Color_t GetFillColor() const
virtual void SetBBoxY2(const Int_t y)
Set bottom of BoundingBox to a value (resize in y direction on bottom)
TObject * GetObject() const
TView * fView
Pointer to 2-D frame (if one exists)
void PaintPolyMarker(Int_t n, Float_t *x, Float_t *y, Option_t *option="")
Paint polymarker in CurrentPad World coordinates.
void CopyBackgroundPixmap(Int_t x, Int_t y)
Copy pixmap of this pad as background of the current pad.
Double_t GetAbsHNDC() const
virtual void SetView(TView *view=0)
Set the current TView. Delete previous view if view=0.
Bool_t TestBit(UInt_t f) const
The most important graphics class in the ROOT system.
virtual void SetLineColor(Color_t lcolor)=0
virtual Bool_t BuildingScene() const =0
virtual Bool_t OpaqueResizing() const
Is pad resizing in opaque mode ?
char * Form(const char *fmt,...)
virtual void ResetToolTip(TObject *tip)
Reset tool tip, i.e.
virtual Double_t GetSumOfWeights() const
Return the sum of weights excluding under/overflows.
virtual void SetAttMarkerPS(Color_t color, Style_t style, Size_t msize)
Set postscript marker attributes.
virtual Short_t GetBorderSize() const
void AbsCoordinates(Bool_t set)
static Int_t GetColor(const char *hexcolor)
Static method returning color number for color specified by hex color string of form: "#rrggbb"...
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save primitives in this pad on the C++ source file out.
virtual const char * GetName() const
Returns name of object.
Bool_t OpaqueResizing() const
Is pad resizing in opaque mode ?
Style_t GetFrameLineStyle() const
The ROOT global object gROOT contains a list of all defined classes.
virtual void SetMarkerStyle(Style_t mstyle=1)
void PaintLine3D(Float_t *p1, Float_t *p2)
Paint 3-D line in the CurrentPad.
virtual Int_t GetNumber() const =0
virtual Int_t Exec(const char *shellcmd)
Execute a command.
Double_t GetUxmax() const
static double p1(double t, double a, double b)
virtual TObjLink * FirstLink() const
virtual Color_t GetLineColor() const
virtual void SetCanvasSize(UInt_t ww, UInt_t wh)
Set canvas size.
virtual TVirtualPadPainter * GetPainter()
Get pad painter from TCanvas.
virtual void ReadFastArray(Bool_t *b, Int_t n)=0
TVirtualPad * GetPadSave() const
Get save pad.
virtual Int_t GetDistancetoAxis(Int_t axis, Int_t px, Int_t py, Double_t &ratio)=0
virtual void SetMarkerSize(Size_t msize=1)
virtual TVirtualPad * GetMother() const
UInt_t GetWindowWidth() const
Each class (see TClass) has a linked list of its base class(es).
virtual Double_t GetY1() const =0
virtual void DrawFrame(Double_t xl, Double_t yl, Double_t xt, Double_t yt, Int_t mode, Int_t border, Int_t dark, Int_t light)=0
virtual void SelectDrawable(Int_t device)=0
char * StrDup(const char *str)
Duplicate the string str.
Color_t GetFrameFillColor() const
virtual void BeginScene()=0
Float_t GetPadLeftMargin() const
const char * GetTitle() const
Returns title of object.
virtual void SetY2(Double_t y2)
virtual Int_t YtoAbsPixel(Double_t y) const =0
virtual 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)
Paint a frame border with Postscript.
virtual void DrawFillArea(Int_t n, const Double_t *x, const Double_t *y)=0
virtual TObject * Last() const
Return the last object in the list. Returns 0 when list is empty.
Float_t GetLeftMargin() const
Int_t XtoPixel(Double_t x) const
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=0)=0
Option_t * GetOption() const
virtual Bool_t IsTransparent() const
virtual void Paint(Option_t *option="")
This method must be overridden if a class wants to paint itself.
virtual void HideToolTip(Int_t event)
Hide tool tip depending on the event type.
void PaintBox(Double_t x1, Double_t y1, Double_t x2, Double_t y2, Option_t *option="")
Paint box in CurrentPad World coordinates.
TCanvasImp * GetCanvasImp() const
Get canvas implementation pointer if any.
virtual Int_t GetSize() const
static const double x1[5]
A Pave (see TPave) with text, lines or/and boxes inside.
void SetClickSelectedPad(TPad *pad)
Int_t GetCrosshair() const
Return the crosshair type (from the mother canvas) crosshair type = 0 means no crosshair.
virtual const char * GetName() const
Returns name of object.
TLegendEntry * AddEntry(const TObject *obj, const char *label="", Option_t *option="lpf")
Add a new entry to this legend.
Int_t GetGLDevice()
Get GL device.
char * EscapeChars(const char *text) const
Introduce an escape character (@) in front of a special chars.
Wrapper around a TObject so it can be stored in a TList.
virtual Bool_t IsEditable() const
void SetCanvasSize(UInt_t ww, UInt_t wh)
Set Width and Height of canvas to ww and wh respectively.
virtual void SetFillStyle(Style_t fstyle)
Override TAttFill::FillStyle for TPad because we want to handle style=0 as style 4000.
Color_t GetPadColor() const
Bool_t fCopyGLDevice
OpenGL off-screen pixmap identifier.
Bool_t IsBatch() const
Is pad in batch mode ?
Double_t XtoPad(Double_t x) const
Convert x from X to pad.
static void Pad(Int_t event, Int_t px, Int_t py, Int_t)
Create a new pad in gPad.
virtual void SetTextSize(Float_t tsize=1)=0
Bool_t IsGrayscale()
Check whether this canvas is to be drawn in grayscale mode.
TVirtualPad * GetClickSelectedPad() const
virtual void GetRange(Double_t &x1, Double_t &y1, Double_t &x2, Double_t &y2)
Return pad world coordinates range.
Double_t GetUymin() const
virtual void SetBBoxY1(const Int_t y)=0
The color creation and management class.
virtual Bool_t IsBatch() const
Is pad in batch mode ?
void Browse(TBrowser *b)
Browse this collection (called by TBrowser).
TObject * GetClickSelected() const
virtual void SetBBoxY1(const Int_t y)
Set top of BoundingBox to a value (resize in y direction on top)
TObject * GetSelected() const
Get selected.
virtual TPoint GetBBoxCenter()=0
virtual Int_t GetMinimumBin() const
Return location of bin with minimum value in the range.
virtual void Clear(Option_t *option="")
Remove all objects from the list.
virtual TObject * WaitPrimitive(const char *pname="", const char *emode="")
Loop and sleep until a primitive with name=pname is found in the pad.
TH1F * GetHistogram() const
Returns a pointer to the histogram used to draw the axis.
virtual void GetPadPar(Double_t &xlow, Double_t &ylow, Double_t &xup, Double_t &yup)
Return lower and upper bounds of the pad in NDC coordinates.
virtual void SetLineStyle(Style_t lstyle)
void SetPadTopMargin(Float_t margin=0.1)
TH1 * GetHistogram() const
Returns a pointer to the histogram used to draw the axis Takes into account the two following cases...
TVirtualViewer3D * fViewer3D
virtual void SetBBoxX2(const Int_t x)
Set right hand side of BoundingBox to a value (resize in x direction on right)
Int_t GetLast() const
Return last bin on the axis i.e.
virtual void Draw(Option_t *option="")
Draw this box with its current attributes.
virtual void SetRightMargin(Float_t rightmargin)
Set Pad right margin in fraction of the pad width.
virtual Style_t GetLineStyle() const =0
Mother of all ROOT objects.
static TVirtualViewer3D * Viewer3D(TVirtualPad *pad=0, Option_t *type="")
void Clear(Option_t *option="")
Delete all pad primitives.
Int_t GetArrayDim() const
Return number of array dimensions.
virtual TObject * First() const
Return the first object in the list. Returns 0 when list is empty.
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.
static Int_t IncreaseDirLevel()
Increase the indentation level for ls().
virtual void SetDoubleBuffer(Int_t mode=1)
Set Double Buffer On/Off.
virtual TVirtualPad * GetPad(Int_t subpadnumber) const
Get a pointer to subpadnumber of this pad.
virtual void DrawPolyMarker(Int_t n, const Double_t *x, const Double_t *y)=0
virtual void Browse(TBrowser *b)
Browse pad.
TList * GetListOfPrimitives() const
virtual void RecordPave(const TObject *obj)
Emit RecordPave() signal.
Int_t YtoPixel(Double_t y) const
Abstract base class for elements drawn in the editor.
virtual void Divide(Int_t nx=1, Int_t ny=1, Float_t xmargin=0.01, Float_t ymargin=0.01, Int_t color=0)
Automatic pad generation by division.
virtual Int_t FindFixBin(Double_t x) const
Find bin number corresponding to abscissa x.
virtual Int_t VtoPixel(Double_t v) const =0
Double_t GetTheta() const
virtual void Add(TObject *obj)
virtual void PadPaint(TVirtualPad *)
virtual void AutoExec()
Execute the list of Execs when a pad event occurs.
void SetTitleFillColor(Color_t color=1)
virtual void RecursiveRemove(TObject *obj)
Remove object from this collection and recursively remove the object from all other objects (and coll...
virtual void SetBBoxX2(const Int_t x)=0
virtual void ReleaseViewer3D(Option_t *type="")
Release current (external) viewer.
virtual void SetBBoxCenterX(const Int_t x)=0
Int_t GetCanvasID() const
Get canvas identifier.
virtual Double_t GetX2() const =0
Short_t Max(Short_t a, Short_t b)
virtual Int_t VtoAbsPixel(Double_t v) const =0
void SetSelected(TObject *obj)
Set selected canvas.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
void PaintPolyLine3D(Int_t n, Double_t *p)
Paint 3-D polyline in the CurrentPad.
virtual void Paint(Option_t *option="")
Paint this wbox with its current attributes.
Each ROOT class (see TClass) has a linked list of methods.
virtual void GetRange(Float_t *min, Float_t *max)=0
static void SetGrayscale(Bool_t set=kTRUE)
Set whether all colors should return grayscale values.
A Graph is a graphics object made of two arrays X and Y with npoints each.
Int_t GetPadBorderMode() const
void SetOptLogy(Int_t logy=1)
Double_t Ceil(Double_t x)
virtual void DrawPS(Int_t n, Float_t *xw, Float_t *yw)=0
Width_t GetFrameLineWidth() const
R__EXTERN TVirtualPS * gVirtualPS
TVirtualPad * GetSelectedPad() const
virtual void InvalidateCS()
Empty definition.
virtual TText * DrawText(Double_t x, Double_t y, const char *text)
Draw this text with new coordinates.
Double_t AbsPixeltoX(Int_t px)
virtual void SetTextColor(Color_t tcolor=1)
virtual TObject * CreateToolTip(const TBox *b, const char *text, Long_t delayms)
Create a tool tip and return its pointer.
virtual void EndScene()=0
virtual void Pop()
Pop pad to the top of the stack.
static Bool_t ContainsTImage(TList *li)
Auxiliary function.
static void IndentLevel()
Functions used by ls() to indent an object hierarchy.
virtual void SetAttTextPS(Int_t align, Float_t angle, Color_t color, Style_t font, Float_t tsize)
Set postscript text attributes.
TObject * fPadPointer
Pointer to 3-D view (if one exists)
virtual Rectangle_t GetBBox()
Return the bounding Box of the Pad.
Bool_t GetPadGridY() const
void SetPadTickY(Int_t ticky)
Style_t GetTitleFont(Option_t *axis="X") const
Return title font.
void SetBatch(Bool_t batch=kTRUE)
Toggle batch mode.
virtual void RangeAxis(Double_t xmin, Double_t ymin, Double_t xmax, Double_t ymax)
Set axis coordinate system for the pad.
static void Line(Int_t event, Int_t px, Int_t py, Int_t mode)
Create a new line/arrow in this gPad.
TVirtualPS is an abstract interface to Postscript, PDF, SVG.
virtual void SetNumber(Int_t number)
virtual Bool_t IsVertical() const
virtual Bool_t ExpandPathName(TString &path)
Expand a pathname getting rid of special shell characters like ~.
TExec is a utility class that can be used to execute a C++ command when some event happens in a pad...
virtual void HandleInput(EEventType button, Int_t x, Int_t y)
Handle Input Events.
Double_t Sqrt(Double_t x)
virtual void SetTextSize(Float_t tsize=1)
virtual void Update()
Update canvas pad buffers.
Draw all kinds of Arrows.
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
Int_t fGLDevice
Off-screen pixmap identifier.
Float_t GetPadTopMargin() const
RooCmdArg FillStyle(Style_t style)
void SetPadRightMargin(Float_t margin=0.1)
static void SetMaxPickDistance(Int_t maxPick=5)
static function to set the maximum Pick Distance fgMaxPickDistance This parameter is used in TPad::Pi...
virtual void ClearDrawable()=0
const char * AsString() const
Return the date & time as a string (ctime() format).
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 ...
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 Width_t GetLineWidth() const
virtual void SetLogz(Int_t value=1)
Set Lin/Log scale for Z.
Double_t fX1
tool tip associated with box
Int_t GetPixmapID() const
static void Pave(Int_t event, Int_t px, Int_t py, Int_t mode)
Create a new pavetext in gPad.
void SetPadGridY(Bool_t gridy)
virtual void SetTitle(const char *title="")
Change (i.e. set) the title of the TNamed.
TList * GetListOfMethods(Bool_t load=kTRUE)
Return list containing the TMethods of a class.
virtual void SetFillStyle(Style_t fstyle)=0
Color_t GetHighLightColor() const
Get highlight color.
virtual void SetY1(Double_t y1)
virtual void x3d(Option_t *type="")
Deprecated: use TPad::GetViewer3D() instead.
void PaintLine(Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Paint line in CurrentPad World coordinates.
virtual TObject * FindObject(const char *name) const
Must be redefined in derived classes.
Double_t AbsPixeltoY(Int_t py)
Short_t GetBorderMode() const
double norm(double *x, double *p)
Int_t VtoPixel(Double_t v) const
virtual void CopyDrawable(Int_t device, Int_t px, Int_t py)=0
virtual UInt_t GetWh() const
Get Wh.
virtual void SetBBoxCenterY(const Int_t y)
Set Y coordinate of the center of the Pad.
virtual void Open(const char *filename, Int_t type=-111)=0
virtual void RangeAxisChanged()
virtual Color_t GetLineColor() const =0
void Modified(Bool_t flag=1)
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...
To make it possible to use GL for 2D graphic in a TPad/TCanvas.
static Int_t fgMaxPickDistance
3D View of this TPad
UInt_t GetWh() const
Get Wh.
static void Ellipse(Int_t event, Int_t px, Int_t py, Int_t mode)
Create a new arc/ellipse in this gPad.
virtual void Exec(const char *command="")
Execute the command referenced by this object.
Short_t GetBorderSize() const
virtual void SetBorderSize(Int_t bordersize=4)
const char * AsSQLString() const
Return the date & time in SQL compatible string format, like: 1997-01-15 20:16:28.
void SetObject(TObject *obj)
virtual Version_t ReadVersion(UInt_t *start=0, UInt_t *bcnt=0, const TClass *cl=0)=0
void PaintText(Double_t x, Double_t y, const char *text)
Paint text in CurrentPad World coordinates.
This class stores the date and time with a precision of one second in an unsigned 32 bit word (950130...
virtual void SetBBoxCenterY(const Int_t y)=0
virtual Bool_t CanLoopOnPrimitives() const
const char Int_t const char * image
virtual void RecordLatex(const TObject *obj)
Emit RecordLatex() signal.
virtual void SetLeftMargin(Float_t leftmargin)
Set Pad left margin in fraction of the pad width.
void DrawDist(Rectangle_t aBBox, Rectangle_t bBBox, char mode)
Draw Arrows to indicated equal distances of Objects with given BBoxes.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a primitive as a C++ statement(s) on output stream "out".
virtual void SetLogy(Int_t value=1)
Set Lin/Log scale for Y.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.