152 fMother = (TPad*)
gPad;
181 fFixedAspectRatio =
kFALSE;
184 fNumPaletteColor = 0;
185 fNextPaletteColor = 0;
200 fUxmin = fUymin = fUxmax = fUymax = 0;
249 :
TVirtualPad(name,title,xlow,ylow,xup,yup,color,bordersize,bordermode)
333 Error(
"TPad",
"You must create a TCanvas before creating a TPad");
340 if ((xlow < 0) || (xlow > 1) || (ylow < 0) || (ylow > 1)) {
341 Error(
"TPad",
"illegal bottom left position: x=%f, y=%f", xlow, ylow);
344 if ((xup < 0) || (xup > 1) || (yup < 0) || (yup > 1)) {
345 Error(
"TPad",
"illegal top right position: x=%f, y=%f", xup, yup);
356 SetPad(name, title, xlow, ylow, xup, yup, color, bordersize, bordermode);
454 while ((exec = (
TExec*)next())) {
495 const char* title,
Option_t *option)
504 while( (o=next()) ) {
508 if (!leg) leg =
new TLegend(x1, y1, x2, y2, title);
515 if (strlen(option)) {
524 if (!leg) leg =
new TLegend(x1, y1, x2, y2, title);
526 TIter nextgraph(grlist);
529 while ((obj = nextgraph())) {
534 if (strlen(option)) opt = option;
539 if (!leg) leg =
new TLegend(x1, y1, x2, y2, title);
541 TIter nexthist(hlist);
544 while ((obj = nexthist())) {
549 if (strlen(option)) opt = option;
562 Info(
"BuildLegend(void)",
"No object to build a TLegend.");
605 while ((obj = next())) {
608 if (n == subpadnumber) {
609 return ((
TPad*)obj)->cd();
678 for (
Int_t i=0;i<2;i++) {
691 while(code1 + code2) {
702 if (ic == 0) ic = code2;
704 yt = y[0] + (y[1]-y[0])*(xclipl-x[0])/(x[1]-x[0]);
708 yt = y[0] + (y[1]-y[0])*(xclipr-x[0])/(x[1]-x[0]);
712 xt = x[0] + (x[1]-x[0])*(yclipb-y[0])/(y[1]-y[0]);
716 xt = x[0] + (x[1]-x[0])*(yclipt-y[0])/(y[1]-y[0]);
722 code1 =
ClippingCode(xt,yt,xclipl,yclipb,xclipr,yclipt);
726 code2 =
ClippingCode(xt,yt,xclipl,yclipb,xclipr,yclipt);
749 for (
Int_t i=0;i<2;i++) {
758 if (x[0] < xclipl) code1 = code1 | 0x1;
759 if (x[0] > xclipr) code1 = code1 | 0x2;
760 if (y[0] < yclipb) code1 = code1 | 0x4;
761 if (y[0] > yclipt) code1 = code1 | 0x8;
763 if (x[1] < xclipl) code2 = code2 | 0x1;
764 if (x[1] > xclipr) code2 = code2 | 0x2;
765 if (y[1] < yclipb) code2 = code2 | 0x4;
766 if (y[1] > yclipt) code2 = code2 | 0x8;
770 while(code1 + code2) {
781 if (ic == 0) ic = code2;
783 yt = y[0] + (y[1]-y[0])*(xclipl-x[0])/(x[1]-x[0]);
787 yt = y[0] + (y[1]-y[0])*(xclipr-x[0])/(x[1]-x[0]);
791 xt = x[0] + (x[1]-x[0])*(yclipb-y[0])/(y[1]-y[0]);
795 xt = x[0] + (x[1]-x[0])*(yclipt-y[0])/(y[1]-y[0]);
801 code1 =
ClippingCode(xt,yt,xclipl,yclipb,xclipr,yclipt);
805 code2 =
ClippingCode(xt,yt,xclipl,yclipb,xclipr,yclipt);
818 if (x < xcl1) code = code | 0x1;
819 if (x > xcl2) code = code | 0x2;
820 if (y < ycl1) code = code | 0x4;
821 if (y > ycl2) code = code | 0x8;
873 x1 = x[n-1]; y1 = y[n-1];
876 for (i=0; i<
n; i++) {
877 x2 = x[i]; y2 = y[i];
881 slope = (y2-y1)/(x2-x1);
885 xc2[nc2] = xclipl; yc2[nc2++] = slope*(xclipl-
x1)+y1;
887 xc2[nc2] =
x2; yc2[nc2++] = y2;
891 xc2[nc2] = xclipl; yc2[nc2++] = slope*(xclipl-
x1)+y1;
892 xc2[nc2] =
x2; yc2[nc2++] = y2;
899 x1 = xc2[nc2-1]; y1 = yc2[nc2-1];
901 for (i=0; i<nc2; i++) {
902 x2 = xc2[i]; y2 = yc2[i];
906 slope = (x2-
x1)/(y2-y1);
910 xc[nc] = x1+(yclipt-y1)*slope; yc[nc++] = yclipt;
912 xc[nc] =
x2; yc[nc++] = y2;
916 xc[nc] = x1+(yclipt-y1)*slope; yc[nc++] = yclipt;
917 xc[nc] =
x2; yc[nc++] = y2;
924 x1 = xc[nc-1]; y1 = yc[nc-1];
926 for (i=0; i<nc; i++) {
927 x2 = xc[i]; y2 = yc[i];
931 slope = (y2-y1)/(x2-x1);
935 xc2[nc2] = xclipr; yc2[nc2++] = slope*(xclipr-
x1)+y1;
937 xc2[nc2] =
x2; yc2[nc2++] = y2;
941 xc2[nc2] = xclipr; yc2[nc2++] = slope*(xclipr-
x1)+y1;
942 xc2[nc2] =
x2; yc2[nc2++] = y2;
949 x1 = xc2[nc2-1]; y1 = yc2[nc2-1];
951 for (i=0; i<nc2; i++) {
952 x2 = xc2[i]; y2 = yc2[i];
956 slope = (x2-
x1)/(y2-y1);
960 xc[nc] = x1+(yclipb-y1)*slope; yc[nc++] = yclipb;
962 xc[nc] =
x2; yc[nc++] = y2;
966 xc[nc] = x1+(yclipb-y1)*slope; yc[nc++] = yclipb;
967 xc[nc] =
x2; yc[nc++] = y2;
1007 if (!
gPad->IsBatch())
1012 if (!
gROOT->GetListOfCanvases())
return;
1014 gROOT->GetListOfCanvases()->Remove(
this);
1035 if (
gROOT->GetSelectedPad() ==
this)
gROOT->SetSelectedPad(0);
1060 while ((obj = next())) {
1062 ((
TPad*)obj)->CopyPixmap();
1063 ((
TPad*)obj)->CopyPixmaps();
1089 Int_t pxl, pyl, pxt, pyt;
1094 if (px1 < px2) {pxl = px1; pxt = px2;}
1095 else {pxl = px2; pxt = px1;}
1096 if (py1 < py2) {pyl = py1; pyt = py2;}
1097 else {pyl = py2; pyt = py1;}
1101 if ( (px > pxl && px < pxt) && (py > pyl && py < pyt) ) {
1108 if (py < pyl) dxl += pyl - py;
1109 if (py > pyt) dxl += py - pyt;
1111 if (py < pyl) dxt += pyl - py;
1112 if (py > pyt) dxt += py - pyt;
1114 if (px < pxl) dyl += pxl - px;
1115 if (px > pxt) dyl += px - pxt;
1117 if (px < pxl) dyt += pxl - px;
1118 if (px > pxt) dyt += px - pxt;
1120 Int_t distance = dxl;
1121 if (dxt < distance) distance = dxt;
1122 if (dyl < distance) distance = dyl;
1123 if (dyt < distance) distance = dyt;
1169 arr[1] =
this; arr[2] = (
void*)&nx;arr[3] = (
void*)& ny;
1170 arr[4] = (
void*)&xmargin; arr[5] = (
void *)& ymargin; arr[6] = (
void *)&color;
1171 if ((*
gThreadXAR)(
"PDCD", 7, arr, 0))
return;
1176 if (nx <= 0) nx = 1;
1177 if (ny <= 0) ny = 1;
1184 char *
name =
new char [nchname];
1185 char *title =
new char [nchtitle];
1188 if (xmargin > 0 && ymargin > 0) {
1192 for (iy=0;iy<ny;iy++) {
1193 y2 = 1 - iy*dy - ymargin;
1194 y1 = y2 - dy + 2*ymargin;
1196 if (y1 > y2)
continue;
1197 for (ix=0;ix<nx;ix++) {
1198 x1 = ix*dx + xmargin;
1199 x2 = x1 +dx -2*xmargin;
1200 if (x1 > x2)
continue;
1203 pad =
new TPad(name,name,x1,y1,x2,y2,color);
1225 for (
Int_t i=0;i<nx;i++) {
1229 if (i == nx-1) x2 = 1-xr;
1230 for (
Int_t j=0;j<ny;j++) {
1231 number = j*nx + i +1;
1234 if (j == 0) y2 = 1-yt;
1235 if (j == ny-1) y1 = 0;
1238 pad =
new TPad(name,title,x1,y1,x2,y2);
1254 if (padsav) padsav->
cd();
1275 Divide( w,
h, xmargin, ymargin, color);
1285 gROOT->MakeDefCanvas();
1323 Int_t nd,nf,nc,nkd,nkf,i,j;
1336 Range(0,0,xpad,ypad);
1341 clevel[nlevel] = obj;
1350 if (nlevel >= maxlev-1)
break;
1354 Int_t ilevel, nelem;
1355 for (ilevel=nlevel;ilevel>=0;ilevel--) {
1356 cl = clevel[ilevel];
1358 if (nelem > maxelem) maxelem = nelem;
1359 nc = (nelem/50) + 1;
1369 if (dx < 1.3) dx = 1.3;
1370 tsizcm = tsizcm - 0.03*
Double_t(ncdraw-5);
1371 if (tsizcm < 0.27) tsizcm = 0.27;
1376 for (ilevel=nlevel;ilevel>=0;ilevel--) {
1377 cl = clevel[ilevel];
1379 if (nelem > maxelem) maxelem = nelem;
1380 nc = (nelem/50) + 1;
1382 if (ilevel < nlevel) x1 = x2 + 0.5;
1400 v1 = y1 -
Double_t(nkf+nkd+nc-1)*dy;
1412 TBox *
box = pt->
AddBox(0,(y1+0.01-v1)/dv,0,(v2-0.01-v1)/dv);
1414 pt->
AddLine(0,(y1-v1)/dv,0,(y1-v1)/dv);
1426 if (i >= nkd) { i = 1; y = y1 - 0.5*dy; x += 1/
Double_t(nc); }
1427 else { i++; y -= dy; }
1435 while (indx < dim ){
1436 ldname = strlen(dname);
1440 pt->
AddText(x,(y-v1)/dv,dname);
1447 pt->
AddLine(0,(ysep-v1)/dv,0,(ysep-v1)/dv);
1458 while ((m = (
TMethod *) nextm())) {
1460 !strcmp( m->
GetName(),
"Dictionary" ) ||
1461 !strcmp( m->
GetName(),
"Class_Version" ) ||
1462 !strcmp( m->
GetName(),
"DeclFileName" ) ||
1463 !strcmp( m->
GetName(),
"DeclFileLine" ) ||
1464 !strcmp( m->
GetName(),
"ImplFileName" ) ||
1465 !strcmp( m->
GetName(),
"ImplFileLine" )
1468 if (fcount > nf)
break;
1469 if (i >= nkf) { i = 1; y = ysep - 0.5*dy; x += 1/
Double_t(nc); }
1470 else { i++; y -= dy; }
1475 for (j=ilevel-1;j>=0;j--) {
1476 if (cl == clevel[ilevel]) {
1477 if (clevel[j]->GetMethodAny((
char*)m->
GetName())) {
1524 Int_t pxmin,pxmax,pymin,pymax,pxold,pyold,px,py;
1536 pxmax = canvas->
GetWw();
1538 pymax = cpad->
GetWh();
1540 if(pxold)
gVirtualX->DrawLine(pxold,pymin,pxold,pymax);
1541 if(pyold)
gVirtualX->DrawLine(pxmin,pyold,pxmax,pyold);
1570 if (
this != padsav) {
1571 Warning(
"DrawFrame",
"Must be called for the current pad only");
1572 return padsav->
DrawFrame(xmin,ymin,xmax,ymax,title);
1578 if (hframe)
delete hframe;
1582 if (
fLogx && xmin > 0 && xmax > xmin) {
1588 for (
Int_t i=1;i<=nbins;i++) {
1591 hframe =
new TH1F(
"hframe",title,nbins,xbins);
1594 hframe =
new TH1F(
"hframe",title,nbins,xmin,xmax);
1604 if (padsav) padsav->
cd();
1620 gPad->SetFillColor(0);
1622 gPad->Range(x1,y1,x2,y2);
1634 for (i=0;i<10;i++) {
1643 box->
DrawBox(xlow, ylow, xup, yup);
1646 box->
DrawBox(xlow, ylow, xup, yup);
1649 text->
DrawText(0.5*(xlow+xup), 0.5*(ylow+yup),
Form(
"%d",color));
1676 const Int_t kMaxDiff = 5;
1677 const Int_t kMinSize = 20;
1678 static Int_t pxorg, pyorg;
1679 static Int_t px1, px2, py1, py2, pxl, pyl, pxt, pyt, pxold, pyold;
1680 static Int_t px1p, px2p, py1p, py2p, pxlp, pylp, pxtp, pytp;
1681 static Bool_t pA, pB, pC, pD, pTop, pL, pR, pBot, pINSIDE;
1704 pA = pB = pC = pD = pTop = pL = pR = pBot = pINSIDE =
kFALSE;
1748 if (newcode)
return;
1815 pA = pB = pC = pD = pTop = pL = pR = pBot = pINSIDE =
kFALSE;
1819 pxold = pxl; pyold = pyl; pA =
kTRUE;
1824 pxold = pxt; pyold = pyl; pB =
kTRUE;
1829 pxold = pxt; pyold = pyt; pC =
kTRUE;
1834 pxold = pxl; pyold = pyt; pD =
kTRUE;
1838 if ((px > pxl+kMaxDiff && px < pxt-kMaxDiff) &&
1840 pxold = pxl; pyold = pyl; pTop =
kTRUE;
1844 if ((px > pxl+kMaxDiff && px < pxt-kMaxDiff) &&
1846 pxold = pxt; pyold = pyt; pBot =
kTRUE;
1850 if ((py > pyl+kMaxDiff && py < pyt-kMaxDiff) &&
1852 pxold = pxl; pyold = pyl; pL =
kTRUE;
1856 if ((py > pyl+kMaxDiff && py < pyt-kMaxDiff) &&
1858 pxold = pxt; pyold = pyt; pR =
kTRUE;
1862 if ((px > pxl+kMaxDiff && px < pxt-kMaxDiff) &&
1863 (py > pyl+kMaxDiff && py < pyt-kMaxDiff)) {
1864 pxold = px; pyold = py; pINSIDE =
kTRUE;
1872 if (pA || pB || pC || pD || pTop || pL || pR || pBot)
1875 if (!pA && !pB && !pC && !pD && !pTop && !pL && !pR && !pBot && !pINSIDE)
1888 if (px > pxt-kMinSize) { px = pxt-kMinSize; wx = px; }
1889 if (py > pyt-kMinSize) { py = pyt-kMinSize; wy = py; }
1890 if (px < pxlp) { px = pxlp; wx = px; }
1891 if (py < pylp) { py = pylp; wy = py; }
1909 if (px < pxl+kMinSize) { px = pxl+kMinSize; wx = px; }
1910 if (py > pyt-kMinSize) { py = pyt-kMinSize; wy = py; }
1911 if (px > pxtp) { px = pxtp; wx = px; }
1912 if (py < pylp) { py = pylp; wy = py; }
1930 if (px < pxl+kMinSize) { px = pxl+kMinSize; wx = px; }
1931 if (py < pyl+kMinSize) { py = pyl+kMinSize; wy = py; }
1932 if (px > pxtp) { px = pxtp; wx = px; }
1933 if (py > pytp) { py = pytp; wy = py; }
1951 if (px > pxt-kMinSize) { px = pxt-kMinSize; wx = px; }
1952 if (py < pyl+kMinSize) { py = pyl+kMinSize; wy = py; }
1953 if (px < pxlp) { px = pxlp; wx = px; }
1954 if (py > pytp) { py = pytp; wy = py; }
1973 if (py2 > py1-kMinSize) { py2 = py1-kMinSize; wy = py2; }
1974 if (py2 < py2p) { py2 = py2p; wy = py2; }
1989 if (py1 < py2+kMinSize) { py1 = py2+kMinSize; wy = py1; }
1990 if (py1 > py1p) { py1 = py1p; wy = py1; }
2005 if (px1 > px2-kMinSize) { px1 = px2-kMinSize; wx = px1; }
2006 if (px1 < px1p) { px1 = px1p; wx = px1; }
2022 if (px2 < px1+kMinSize) { px2 = px1+kMinSize; wx = px2; }
2023 if (px2 > px2p) { px2 = px2p; wx = px2; }
2038 Int_t dx = px - pxold;
2039 Int_t dy = py - pyold;
2040 px1 += dx; py1 += dy; px2 += dx; py2 += dy;
2041 if (px1 < px1p) { dx = px1p - px1; px1 += dx; px2 += dx; wx = px+dx; }
2042 if (px2 > px2p) { dx = px2 - px2p; px1 -= dx; px2 -= dx; wx = px-dx; }
2043 if (py1 > py1p) { dy = py1 - py1p; py1 -= dy; py2 -= dy; wy = py-dy; }
2044 if (py2 < py2p) { dy = py2p - py2; py1 += dy; py2 += dy; wy = py+dy; }
2058 x1 = x2 = y1 = y2 = 0;
2085 if (pTop || pBot || pL || pR || pINSIDE) {
2092 if (px != pxorg || py != pyorg) {
2116 if (pINSIDE)
gPad->ShowGuidelines(
this, event);
2117 if (pTop)
gPad->ShowGuidelines(
this, event,
't',
true);
2118 if (pBot)
gPad->ShowGuidelines(
this, event,
'b',
true);
2119 if (pL)
gPad->ShowGuidelines(
this, event,
'l',
true);
2120 if (pR)
gPad->ShowGuidelines(
this, event,
'r',
true);
2121 if (pA)
gPad->ShowGuidelines(
this, event,
'1',
true);
2122 if (pB)
gPad->ShowGuidelines(
this, event,
'2',
true);
2123 if (pC)
gPad->ShowGuidelines(
this, event,
'3',
true);
2124 if (pD)
gPad->ShowGuidelines(
this, event,
'4',
true);
2133 if (
gROOT->IsEscaped()) {
2138 if (opaque||ropaque) {
2141 x1 = x2 = y1 = y2 = 0;
2167 if (pTop || pBot || pL || pR || pINSIDE) {
2174 if (pA || pB || pC || pD || pTop || pL || pR || pBot)
2180 if (px != pxorg || py != pyorg) {
2217 event =
gVirtualX->RequestLocator(1, 1, px, py);
2256 static Int_t axisNumber;
2258 static Int_t px1old, py1old, px2old, py2old;
2262 static TBox *zoombox;
2263 Double_t zbx1=0,zbx2=0,zby1=0,zby2=0;
2270 if (strstr(opt,
"cont4")) {
2279 if (!strcmp(axis->
GetName(),
"xaxis")) {
2283 if (!strcmp(axis->
GetName(),
"yaxis")) {
2287 if (!strcmp(axis->
GetName(),
"zaxis")) {
2293 if (axisNumber == 1) {
2299 }
else if (axisNumber == 2) {
2315 if (axisNumber == 1) {
2320 }
else if (axisNumber == 2) {
2334 zoombox =
new TBox(zbx1, zby1, zbx2, zby2);
2345 if (!opaque)
gVirtualX->SetLineColor(-1);
2353 if (axisNumber == 1) {
2363 if (axisNumber == 1) {
2368 }
else if (axisNumber == 2) {
2383 zoombox->
SetX1(zbx1);
2384 zoombox->
SetY1(zby1);
2385 zoombox->
SetX2(zbx2);
2386 zoombox->
SetY2(zby2);
2419 if (
gROOT->IsEscaped()) {
2421 if (opaque && zoombox) {
2430 if (ratio1 > ratio2) {
2435 if (ratio2 - ratio1 > 0.05) {
2437 if (axisNumber == 3 && hobj && hobj->
GetDimension() != 3) {
2446 Float_t newmin = zmin + (zmax-zmin)*ratio1;
2447 Float_t newmax = zmin + (zmax-zmin)*ratio2;
2460 bin1 = first +
Int_t((last-first+1)*ratio1);
2461 bin2 = first +
Int_t((last-first+1)*ratio2);
2471 if (axisNumber == 1) {
2479 }
else if (axisNumber == 2) {
2507 xmin = ((xmin-xmi)/(xma-xmi))*(up-low)+low;
2508 xmax = ((xmax-xmi)/(xma-xmi))*(up-low)+low;
2511 if (!strcmp(axis->
GetName(),
"xaxis")) axisNumber = 1;
2512 if (!strcmp(axis->
GetName(),
"yaxis")) axisNumber = 2;
2513 if (ratio2 - ratio1 > 0.05) {
2520 if (axisNumber == 1) axis->
SetRange(bin1,bin2);
2521 if (axisNumber == 2 && hobj1) {
2538 while ((obj= next())) {
2541 if (hobj == hobj1)
continue;
2544 if (axisNumber == 1) {
2546 }
else if (axisNumber == 2) {
2589 if (found)
return found;
2592 while ((cur = next())) {
2595 if (found)
return found;
2610 if (found)
return found;
2613 while ((cur = next())) {
2616 if (found)
return found;
2691 if (
fCanvas ==
this)
return 0;
2700 if (
fCanvas ==
this)
return 0;
2709 if (
fCanvas ==
this)
return 0;
2852 while ((obj=next())) {
2853 if (!strcmp(name, obj->
GetName()))
return obj;
2856 if (found)
return found;
2866 if (!subpadnumber) {
2873 while ((obj = next())) {
2876 if (pad->
GetNumber() == subpadnumber)
return pad;
2923 if (color <= 0)
return;
2941 gROOT->SetSelectedPad(
this);
2958 <<
" Name= "<<
GetName()<<
" Title= "<<
GetTitle()<<
" Option="<<option<<std::endl;
2970 if (opt.
Index(
"pfc")>=0 || opt.
Index(
"plc")>=0 || opt.
Index(
"pmc")>=0) {
2988 if (i>=ncolors) i = ncolors-1;
3000 Int_t const cellSize = 10;
3019 for (
int i = 0; i<
fCGnx; i++) {
3020 for (
int j = 0; j<
fCGny; j++) {
3031 for (
int i=0; i<np; i++) {
3048 for (
int r=i;
r<w+i;
r++) {
3049 for (
int c=j;
c<h+j;
c++) {
3076 for (
Int_t i = 0; i<nxmax; i++) {
3077 for (
Int_t j = 0; j<=nymax; j++) {
3090 #define NotFree(i, j) fCollideGrid[TMath::Max(TMath::Min(i+j*fCGnx,fCGnx*fCGny),0)] = kFALSE; 3109 for (i=y1+1; i<y2; i++)
NotFree(x1,i);
3116 xt =
x1; x1 =
x2; x2 = xt;
3117 yt = y1; y1 = y2; y2 = yt;
3119 for (i=x1+1; i<
x2; i++) {
3126 yt = y1; y1 = y2; y2 = yt;
3127 xt =
x1; x1 =
x2; x2 = xt;
3129 for (j=y1+1; j<y2; j++) {
3149 for (
int i = x1; i<=
x2; i++) {
3150 for (
int j = y1; j<=y2; j++)
NotFree(i, j);
3168 for (i = x1; i<=
x2; i++) {
3173 for (i = y1; i<=y2; i++) {
3191 for (
Int_t i=1; i<
n; i++) {
3207 (
int)((y1-
fY1)/ys), (
int)((y2-
fY1)/ys));
3220 if (name.
Index(
"hframe") >= 0)
return;
3225 bool haserrors =
false;
3230 if (drawOption.
Index(
"hist") < 0) {
3231 if (drawOption.
Index(
"e") >= 0) haserrors =
true;
3239 for (i = 1; i<nx; i++) {
3259 for (j=y1; j<=y2; j++) {
3281 x1 = (int)((x1l-
fX1)/xs);
3297 box->SetFillColorAlpha(
kRed,0.5);
3308 for (
int i = 0; i<
fCGnx; i++) {
3311 for (
int j = 0; j<
fCGny; j++) {
3312 if (
gPad->GetLogx()) {
3319 if (
gPad->GetLogy()) {
3328 box->DrawBox(X1L, Y1L, X2L, Y2L);
3330 box->SetFillColorAlpha(
kRed,t);
3331 box->DrawBox(X1L, Y1L, X2L, Y2L);
3335 if (t==0.15) t = 0.1;
3429 began3DScene =
kTRUE;
3436 if (padsav) padsav->cd();
3465 if (color < 0) color = -color;
3472 if (bordersize <= 0) bordersize = 2;
3493 if (px1 < px2) {xl =
fX1; xt =
fX2; }
3494 else {xl =
fX2; xt =
fX1;}
3495 if (py1 > py2) {yl =
fY1; yt =
fY2;}
3496 else {yl =
fY2; yt =
fY1;}
3498 Double_t frameXs[7] = {}, frameYs[7] = {};
3502 frameXs[0] = xl; frameYs[0] = yl;
3503 frameXs[1] = xl + realBsX; frameYs[1] = yl + realBsY;
3504 frameXs[2] = frameXs[1]; frameYs[2] = yt - realBsY;
3505 frameXs[3] = xt - realBsX; frameYs[3] = frameYs[2];
3506 frameXs[4] = xt; frameYs[4] = yt;
3507 frameXs[5] = xl; frameYs[5] = yt;
3508 frameXs[6] = xl; frameYs[6] = yl;
3515 frameXs[0] = xl; frameYs[0] = yl;
3516 frameXs[1] = xl + realBsX; frameYs[1] = yl + realBsY;
3517 frameXs[2] = xt - realBsX; frameYs[2] = frameYs[1];
3518 frameXs[3] = frameXs[2]; frameYs[3] = yt - realBsY;
3519 frameXs[4] = xt; frameYs[4] = yt;
3520 frameXs[5] = xt; frameYs[5] = yl;
3521 frameXs[6] = xl; frameYs[6] = yl;
3654 ((
TPad*)obj)->PaintModified();
3666 began3DScene =
kTRUE;
3674 if (padsav) padsav->cd();
3695 if (!
gPad->IsBatch()) {
3698 if (option[0] ==
's') {
3703 if (style > 3000 && style < 4000) {
3709 if (style >= 3100 && style < 4000) {
3711 xb[0] =
x1; xb[1] =
x1; xb[2] =
x2; xb[3] =
x2;
3712 yb[0] = y1; yb[1] = y2; yb[2] = y2; yb[3] = y1;
3722 }
else if (style >= 4000 && style <= 4100) {
3747 }
else if (style >= 1000 && style <= 1999) {
3761 if (option[0] ==
's') {
3764 if (style0 >= 3100 && style0 < 4000) {
3766 xb[0] =
x1; xb[1] =
x1; xb[2] =
x2; xb[3] =
x2;
3767 yb[0] = y1; yb[1] = y2; yb[2] = y2; yb[3] = y1;
3773 if (option[0] ==
'l') {
3792 while ((obj = next())) {
3794 if (obj == stop)
break;
3795 ((
TPad*)obj)->CopyBackgroundPixmap(x, y);
3796 ((
TPad*)obj)->CopyBackgroundPixmaps((
TPad*)obj, stop, x, y);
3815 Warning(
"TPad::PaintFillArea",
"Float_t signature is obsolete. Use Double_t signature.");
3838 n =
ClipPolygon(nn, xx, yy, nc, x, y,xmin,ymin,xmax,ymax);
3848 if (fillstyle >= 3100 && fillstyle < 4000) {
3855 if (!
gPad->IsBatch())
3902 static Double_t ang1[10] = {0., 10., 20., 30., 45.,5., 60., 70., 80., 90.};
3903 static Double_t ang2[10] = {180.,170.,160.,150.,135.,5.,120.,110.,100., 90.};
3905 Int_t fasi = FillStyle%1000;
3908 Int_t iAng1 = fasi%10;
3916 if (!
gPad->IsBatch()) {
3929 if (!
gPad->IsBatch()) {
3941 if (ang1[iAng1] != 5.)
PaintHatches(dy, ang1[iAng1], nn, xx, yy);
3942 if (ang2[iAng2] != 5.)
PaintHatches(dy, ang2[iAng2], nn, xx, yy);
3945 if (!
gPad->IsBatch()) {
3969 const Int_t maxnbi = 100;
3970 Double_t xli[maxnbi], xlh[2], ylh[2], xt1, xt2, yt1, yt2;
3971 Double_t ll,
x,
y,
x1,
x2, y1, y2,
a,
b, xi, xip, xin, yi, yip;
3977 ratiox = 1/(rwxmax-rwxmin);
3978 ratioy = 1/(rwymax-rwymin);
3991 gPad->GetPadPar(x1p,y1p,x2p,y2p);
4000 for (i=1; i<=nn; i++) {
4001 x = wndc*ratiox*(xx[i-1]-rwxmin);
4002 y = hndc*ratioy*(yy[i-1]-rwymin);
4003 yrot = sina*x+cosa*
y;
4004 if (yrot > ymax) ymax = yrot;
4005 if (yrot < ymin) ymin = yrot;
4009 for (ycur=ymax; ycur>=
ymin; ycur=ycur-dy) {
4011 for (i=2; i<=nn+1; i++) {
4014 if (i == nn+1) i2=1;
4015 x1 = wndc*ratiox*(xx[i1-1]-rwxmin);
4016 y1 = hndc*ratioy*(yy[i1-1]-rwymin);
4017 x2 = wndc*ratiox*(xx[i2-1]-rwxmin);
4018 y2 = hndc*ratioy*(yy[i2-1]-rwymin);
4019 xt1 = cosa*x1-sina*y1;
4020 yt1 = sina*x1+cosa*y1;
4021 xt2 = cosa*x2-sina*y2;
4022 yt2 = sina*x2+cosa*y2;
4033 if ((yi <= ycur) && (ycur < yip)) {
4035 if (nbi >= maxnbi)
return;
4045 if (nbi >= maxnbi)
return;
4048 if (nbi >= maxnbi)
return;
4055 a = (yt1-yt2)/(xt1-xt2);
4056 b = (yt2*xt1-xt2*yt1)/(xt1-xt2);
4065 if ((xi <= xin) && (xin < xip) &&
4069 if (nbi >= maxnbi)
return;
4078 for (i=1; i<=
m; i++) {
4079 if (xli[i] < xli[i-1]) {
4087 if (inv == 0)
goto L50;
4093 if (nbi%2 != 0)
continue;
4095 for (i=1; i<=nbi; i=i+2) {
4097 xlh[0] = cosb*xli[i-1]-sinb*ycur;
4098 ylh[0] = sinb*xli[i-1]+cosb*ycur;
4099 xlh[1] = cosb*xli[i] -sinb*ycur;
4100 ylh[1] = sinb*xli[i] +cosb*ycur;
4102 xlh[0] = (xlh[0]/wndc)*(rwxmax-rwxmin)+rwxmin;
4103 ylh[0] = (ylh[0]/hndc)*(rwymax-rwymin)+rwymin;
4104 xlh[1] = (xlh[1]/wndc)*(rwxmax-rwxmin)+rwxmin;
4105 ylh[1] = (ylh[1]/hndc)*(rwymax-rwymin)+rwymin;
4106 gPad->PaintLine(xlh[0], ylh[0], xlh[1], ylh[1]);
4117 x[0] =
x1; x[1] =
x2; y[0] = y1; y[1] = y2;
4126 if (!
gPad->IsBatch())
4142 if (!
gPad->IsBatch())
4167 for (i=0;i<3;i++) temp[i] = p1[i];
4169 for (i=0;i<3;i++) temp[i] = p2[i];
4171 PaintLine(xpad[0],xpad[1],xpad[3],xpad[4]);
4185 for (i=0;i<3;i++) temp[i] = p1[i];
4187 for (i=0;i<3;i++) temp[i] = p2[i];
4189 PaintLine(xpad[0],xpad[1],xpad[3],xpad[4]);
4205 Int_t i, i1=-1,np=1;
4206 for (i=0; i<n-1; i++) {
4211 Int_t iclip =
Clip(&x[i],&y[i],xmin,ymin,xmax,ymax);
4218 if (iclip == 0 && i < n-2)
continue;
4219 if (!
gPad->IsBatch())
4252 if (option && (option[0] ==
'C')) mustClip =
kFALSE;
4255 Int_t i, i1=-1, np=1, iclip=0;
4257 for (i=0; i < n-1; i++) {
4263 iclip =
Clip(&x[i],&y[i],xmin,ymin,xmax,ymax);
4271 if (iclip == 0 && i < n-2)
continue;
4272 if (!
gPad->IsBatch())
4297 if (!
gPad->IsBatch())
4303 for (
Int_t i=0; i<
n; i++) {
4322 for (
Int_t i = 1; i <
n; i++)
4341 for (i=0; i<
n; i++) {
4342 if (x[i] >= xmin && x[i] <= xmax && y[i] >= ymin && y[i] <= ymax) {
4345 if (i < n-1)
continue;
4347 if (np == 0)
continue;
4348 if (!
gPad->IsBatch())
4372 for (i=0; i<
n; i++) {
4373 if (x[i] >= xmin && x[i] <= xmax && y[i] >= ymin && y[i] <= ymax) {
4376 if (i < n-1)
continue;
4378 if (np == 0)
continue;
4379 if (!
gPad->IsBatch())
4397 if (!
gPad->IsBatch())
4410 if (!
gPad->IsBatch())
4423 if (!
gPad->IsBatch())
4440 if (!
gPad->IsBatch())
4468 if (
gPad == 0)
return 0;
4475 if (
this !=
gPad->GetCanvas()) {
4476 if (!((x >=
fX1 && x <=
fX2) && (y >=
fY1 && y <=
fY2)))
return 0;
4484 TPad *picked =
this;
4488 pickobj = &dummyLink;
4517 pick = ((
TPad*)obj)->
Pick(px, py, pickobj);
4522 }
else if (!
gROOT->GetEditorMode()) {
4529 if (dist == 0)
break;
4544 if (
fView && !gotPrim) {
4568 if (picked ==
this) {
4590 while ((obj = next()))
4592 char *opt =
StrDup(next.GetOption());
4619 ((
TPad*)
this)->SaveAs(filename);
4631 while ((obj = next())) {
4776 const char *filename;
4794 filename = fs2.
Data();
4797 const char *opt_default=
"ps";
4799 Int_t lenfil = filename ? strlen(filename) : 0;
4800 TString opt = (!option) ? opt_default : option;
4822 if (strstr(opt,
"gif+")) {
4825 }
else if (strstr(opt,
"gif")) {
4828 }
else if (strstr(opt,
"png")) {
4831 }
else if (strstr(opt,
"jpg")) {
4834 }
else if (strstr(opt,
"tiff")) {
4837 }
else if (strstr(opt,
"xpm")) {
4840 }
else if (strstr(opt,
"bmp")) {
4847 if (!
gROOT->IsBatch() && image) {
4850 Color_t hc =
gPad->GetCanvas()->GetHighLightColor();
4851 gPad->GetCanvas()->SetHighLightColor(-1);
4857 Info(
"Print",
"GIF file %s has been created", psname.
Data());
4859 gPad->GetCanvas()->SetHighLightColor(hc);
4863 Color_t hc =
gPad->GetCanvas()->GetHighLightColor();
4864 gPad->GetCanvas()->SetHighLightColor(-1);
4879 Info(
"Print",
"file %s has been created", psname.
Data());
4881 gPad->GetCanvas()->SetHighLightColor(hc);
4883 Warning(
"Print",
"Unsupported image format %s", psname.
Data());
4889 if (strstr(opt,
"cxx")) {
4895 if (strstr(opt,
"root")) {
4901 if (strstr(opt,
"xml")) {
4908 if (strstr(opt,
"json")) {
4914 if (strstr(opt,
"svg")) {
4929 if ((h =
gROOT->GetPluginManager()->FindHandler(
"TVirtualPS",
"svg"))) {
4956 if (strstr(opt,
"tex")) {
4971 if ((h =
gROOT->GetPluginManager()->FindHandler(
"TVirtualPS",
"tex"))) {
5007 copen = psname.
EndsWith(
"(");
if (copen) psname[psname.
Length()-1] = 0;
5008 cclose = psname.
EndsWith(
")");
if (cclose) psname[psname.
Length()-1] = 0;
5009 copenb = psname.
EndsWith(
"[");
if (copenb) psname[psname.
Length()-1] = 0;
5010 ccloseb = psname.
EndsWith(
"]");
if (ccloseb) psname[psname.
Length()-1] = 0;
5014 if (copen || copenb) mustClose =
kFALSE;
5015 if (cclose || ccloseb) mustClose =
kTRUE;
5026 if (ratio < 1) pstype = 112;
5027 if (strstr(opt,
"Portrait")) pstype = 111;
5028 if (strstr(opt,
"Landscape")) pstype = 112;
5029 if (strstr(opt,
"eps")) pstype = 113;
5030 if (strstr(opt,
"Preview")) pstype = 113;
5038 if (strstr(opt,
"pdf") || strstr(opt,
"Title:")) {
5039 if ((h =
gROOT->GetPluginManager()->FindHandler(
"TVirtualPS",
"pdf"))) {
5045 if ((h =
gROOT->GetPluginManager()->FindHandler(
"TVirtualPS",
"image"))) {
5050 if ((h =
gROOT->GetPluginManager()->FindHandler(
"TVirtualPS",
"ps"))) {
5059 if (titlePos !=
kNPOS) {
5066 if (!strstr(opt,
"pdf") || image) {
5083 if (!copen)
Info(
"Print",
"%s file %s has been created", opt.
Data(), psname.
Data());
5084 else Info(
"Print",
"%s file %s has been created using the current canvas", opt.
Data(), psname.
Data());
5093 if (titlePos !=
kNPOS) {
5100 if (cclose)
Info(
"Print",
"Current canvas added to %s file %s and file closed", opt.
Data(), psname.
Data());
5101 else Info(
"Print",
"%s file %s has been closed", opt.
Data(), psname.
Data());
5106 Info(
"Print",
"Current canvas added to %s file %s", opt.
Data(), psname.
Data());
5123 if ((x1 >= x2) || (y1 >= y2)) {
5124 Error(
"Range",
"illegal world coordinates range: x1=%f, y1=%f, x2=%f, y2=%f",x1,y1,x2,y2);
5133 if (
fX1 == x1 &&
fY1 == y1 &&
fX2 == x2 &&
fY2 == y2)
return;
5161 if ((xmin >= xmax) || (ymin >= ymax)) {
5162 Error(
"RangeAxis",
"illegal axis coordinates range: xmin=%f, ymin=%f, xmax=%f, ymax=%f",
5163 xmin, ymin, xmax, ymax);
5215 while ((obj = next())) {
5226 if (h1f) h1f->
DrawCopy(
"sameaxis");
5245 if (padsav) padsav->
cd();
5375 if (
this ==
gPad->GetCanvas()) {
5407 fYtoPixelk = rounding + -pyrange - pyrange*fY1/yrange;
5428 while ((obj = next())) {
5434 if (
gPad->IsBatch())
5452 Warning(
"ResizePad",
"Inf/NaN propagated to the pad. Check drawn objects.");
5453 if (w <= 0 || w > 10000) {
5454 Warning(
"ResizePad",
"%s width changed from %d to %d\n",
GetName(),w,10);
5457 if (h <= 0 || h > 10000) {
5458 Warning(
"ResizePad",
"%s height changed from %d to %d\n",
GetName(),h,10);
5473 if (padsav ==
this) {
5507 Int_t lenfil = filename ? strlen(filename) : 0;
5510 else psname = filename;
5573 const char *cname =
GetName();
5574 Int_t nch = strlen(cname);
5576 strlcpy(lcname,cname,10);
5577 for (
Int_t k=1;k<=nch;k++) {
if (lcname[nch-k] ==
' ') lcname[nch-k] = 0;}
5578 if (lcname[0] == 0) {
5579 if (
this ==
gPad->GetCanvas()) {strlcpy(lcname,
"c1",10); nch = 2;}
5580 else {strlcpy(lcname,
"pad",10); nch = 3;}
5586 if (
this !=
gPad->GetCanvas()) {
5587 out <<
" "<<std::endl;
5588 out <<
"// ------------>Primitives in pad: "<<
GetName()<<std::endl;
5590 out<<
" TPad *"<<cname<<
" = new TPad("<<quote<<
GetName()<<quote<<
", "<<quote<<
GetTitle()
5597 out<<
" "<<cname<<
"->Draw();"<<std::endl;
5598 out<<
" "<<cname<<
"->cd();"<<std::endl;
5600 out<<
" "<<cname<<
"->Range("<<
fX1<<
","<<
fY1<<
","<<
fX2<<
","<<
fY2<<
");"<<std::endl;
5605 static Int_t viewNumber = 0;
5606 out<<
" TView *view"<<++viewNumber<<
" = TView::CreateView(1);"<<std::endl;
5607 out<<
" view"<<viewNumber<<
"->SetRange("<<rmin[0]<<
","<<rmin[1]<<
","<<rmin[2]<<
"," 5608 <<rmax[0]<<
","<<rmax[1]<<
","<<rmax[2]<<
");"<<std::endl;
5613 out<<
" "<<cname<<
"->SetFillColor(ci);" << std::endl;
5615 out<<
" "<<cname<<
"->SetFillColor("<<
GetFillColor()<<
");"<<std::endl;
5618 out<<
" "<<cname<<
"->SetFillStyle("<<
GetFillStyle()<<
");"<<std::endl;
5621 out<<
" "<<cname<<
"->SetBorderMode("<<
GetBorderMode()<<
");"<<std::endl;
5624 out<<
" "<<cname<<
"->SetBorderSize("<<
GetBorderSize()<<
");"<<std::endl;
5627 out<<
" "<<cname<<
"->SetLogx();"<<std::endl;
5630 out<<
" "<<cname<<
"->SetLogy();"<<std::endl;
5633 out<<
" "<<cname<<
"->SetLogz();"<<std::endl;
5636 out<<
" "<<cname<<
"->SetGridx();"<<std::endl;
5639 out<<
" "<<cname<<
"->SetGridy();"<<std::endl;
5642 out<<
" "<<cname<<
"->SetTickx("<<
GetTickx()<<
");"<<std::endl;
5645 out<<
" "<<cname<<
"->SetTicky("<<
GetTicky()<<
");"<<std::endl;
5648 out<<
" "<<cname<<
"->SetTheta("<<
GetTheta()<<
");"<<std::endl;
5651 out<<
" "<<cname<<
"->SetPhi("<<
GetPhi()<<
");"<<std::endl;
5654 out<<
" "<<cname<<
"->SetLeftMargin("<<
GetLeftMargin()<<
");"<<std::endl;
5657 out<<
" "<<cname<<
"->SetRightMargin("<<
GetRightMargin()<<
");"<<std::endl;
5660 out<<
" "<<cname<<
"->SetTopMargin("<<
GetTopMargin()<<
");"<<std::endl;
5663 out<<
" "<<cname<<
"->SetBottomMargin("<<
GetBottomMargin()<<
");"<<std::endl;
5669 out<<
" "<<cname<<
"->SetFrameFillColor(ci);" << std::endl;
5682 out<<
" "<<cname<<
"->SetFrameLineColor(ci);" << std::endl;
5702 out<<
" "<<cname<<
"->SetFrameFillColor(ci);" << std::endl;
5704 out<<
" "<<cname<<
"->SetFrameFillColor("<<frame->
GetFillColor()<<
");"<<std::endl;
5707 out<<
" "<<cname<<
"->SetFrameFillStyle("<<frame->
GetFillStyle()<<
");"<<std::endl;
5710 out<<
" "<<cname<<
"->SetFrameLineStyle("<<frame->
GetLineStyle()<<
");"<<std::endl;
5715 out<<
" "<<cname<<
"->SetFrameLineColor(ci);" << std::endl;
5717 out<<
" "<<cname<<
"->SetFrameLineColor("<<frame->
GetLineColor()<<
");"<<std::endl;
5720 out<<
" "<<cname<<
"->SetFrameLineWidth("<<frame->
GetLineWidth()<<
");"<<std::endl;
5723 out<<
" "<<cname<<
"->SetFrameBorderMode("<<frame->
GetBorderMode()<<
");"<<std::endl;
5726 out<<
" "<<cname<<
"->SetFrameBorderSize("<<frame->
GetBorderSize()<<
");"<<std::endl;
5734 while ((obj = next())) {
5736 if (!strcmp(obj->
GetName(),
"Graph")) ((
TGraph*)obj)->SetName(
Form(
"Graph%d",grnum++));
5739 out<<
" "<<cname<<
"->Modified();"<<std::endl;
5741 if (padsav) padsav->
cd();
5754 Error(
"SetAspectRatio",
"cannot fix aspect ratio, height of pad is 0");
5778 while ((obj = next())) {
5792 if (fstyle == 0) fstyle = 4000;
5885 SetPad(xlow, ylow, xup, yup);
5893 if (!view)
delete fView;
5966 x1 = x2 = y1 = y2 = 0;
5968 if (aBBox.
fX<bBBox.
fX) {
5984 else if (mode ==
'y') {
5985 if (aBBox.
fY<bBBox.
fY) {
6023 : fa(0), fb(0), fdist(0), fdir(
' ')
6027 : fa(a), fb(b), fdist(dist), fdir(direction)
6053 std::vector<dField> curDist;
6054 std::vector<dField> otherDist;
6064 Int_t dSizeArrow = 12;
6066 movedX = movedY =
false;
6069 if (mode !=
'i') resize =
true;
6071 TPad *is_pad =
dynamic_cast<TPad *
>( object );
6076 static TPad * tmpGuideLinePad;
6079 if (tmpGuideLinePad) {
6080 if (
object == tmpGuideLinePad) {
6081 tmpGuideLinePad->
Delete();
6082 tmpGuideLinePad = 0;
6085 tmpGuideLinePad->
Delete();
6086 tmpGuideLinePad = 0;
6090 prims =
gPad->GetListOfPrimitives();
6097 if (!tmpGuideLinePad){
6098 tmpGuideLinePad =
new TPad(
"tmpGuideLinePad",
"tmpGuideLinePad", 0, 0, 1, 1);
6100 gPad->GetRange(x1, y1, x2, y2);
6101 tmpGuideLinePad->
Range(x1, y1, x2, y2);
6104 tmpGuideLinePad->
Draw();
6105 tmpGuideLinePad->
cd();
6106 gPad->GetRange(x1, y1, x2, y2);
6108 if (cling && !log) threshold = 7;
6121 MX =
gPad->GetX1() + 0.5 * (
gPad->GetX2()-
gPad->GetX1());
6122 MY =
gPad->GetY1() + 0.5 * (
gPad->GetY2()-
gPad->GetY1());
6123 pMX =
gPad->XtoPixel(MX);
6124 pMY =
gPad->YtoPixel(MY);
6127 if (cling && (!resize)) {
6139 if (cling && (!resize)) {
6151 for (
UInt_t i = 0; i<
n; i++) {
6157 if (cling && (!resize)) {
6169 if (cling && (!resize)) {
6184 for (
UInt_t i = 0; i<
n; i++) {
6188 for (
UInt_t j = i+1; j<
n; j++) {
6196 dField abDist = dField();
6199 if ((b != cur)&&(a != cur)) otherDist.push_back(abDist);
6200 else curDist.push_back(abDist);
6204 dField abDist = dField();
6207 if ((b != cur)&&(a != cur)) otherDist.push_back(abDist);
6208 else curDist.push_back(abDist);
6216 for (
UInt_t i = 0; i<curDist.size(); i++) {
6217 for (
UInt_t j = 0; j<otherDist.size(); j++) {
6218 if ((curDist[i].fdir == otherDist[j].fdir)&&(otherDist[j].fdir==
'x')&&(
TMath::Abs(curDist[i].fdist-otherDist[j].fdist)<threshold)) {
6219 if (cling && (!movedX) && (!resize)) {
6225 DrawDist(curDist[i].fa->GetBBox(), curDist[i].fb->GetBBox(),
'x');
6226 DrawDist(otherDist[j].fa->GetBBox(), otherDist[j].fb->GetBBox(),
'x');
6228 if ((curDist[i].fdir == otherDist[j].fdir)&&(otherDist[j].fdir==
'y')&&(
TMath::Abs(curDist[i].fdist-otherDist[j].fdist)<threshold)) {
6229 if (cling && (!movedY) && (!resize)) {
6235 DrawDist(curDist[i].fa->GetBBox(), curDist[i].fb->GetBBox(),
'y');
6236 DrawDist(otherDist[j].fa->GetBBox(), otherDist[j].fb->GetBBox(),
'y');
6239 for (
UInt_t j = i; j<curDist.size(); j++) {
6241 if ((curDist[i].fdir == curDist[j].fdir)&&(curDist[j].fdir==
'x')&&(
TMath::Abs(curDist[i].fdist-curDist[j].fdist)<threshold)) {
6242 if (cling && (!movedX) && (!resize)) {
6247 DrawDist(curDist[i].fa->GetBBox(), curDist[i].fb->GetBBox(),
'x');
6248 DrawDist(curDist[j].fa->GetBBox(), curDist[j].fb->GetBBox(),
'x');
6251 if ((curDist[i].fdir == curDist[j].fdir)&&(curDist[j].fdir==
'y')&&(
TMath::Abs(curDist[i].fdist-curDist[j].fdist)<threshold)) {
6252 if (cling && (!movedY) && (!resize)) {
6257 DrawDist(curDist[i].fa->GetBBox(), curDist[i].fb->GetBBox(),
'y');
6258 DrawDist(curDist[j].fa->GetBBox(), curDist[j].fb->GetBBox(),
'y');
6265 for (
UInt_t i = 0; i<
n; i++) {
6267 if (a && (cur != a)) {
6280 gPad->PixeltoX(aBBox.
fX+aBBox.
fWidth),
gPad->PixeltoY(aBBox.
fY-dSizeArrow-
gPad->VtoPixel(0)), 0.01,
"<|>");
6322 if (tmpGuideLinePad) {
6325 tmpGuideLinePad->
Delete();
6326 tmpGuideLinePad = 0;
6393 if (text && strlen(text))
6412 Int_t nch, nobjects;
6432 while ((obj = next())) {
6451 TObject::Streamer(b);
6452 TAttLine::Streamer(b);
6453 TAttFill::Streamer(b);
6454 b >> single;
fX1 = single;
6455 b >> single;
fY1 = single;
6456 b >> single;
fX2 = single;
6457 b >> single;
fY2 = single;
6460 TAttPad::Streamer(b);
6462 TVirtualPad::Streamer(b);
6463 TAttPad::Streamer(b);
6464 b >> single;
fX1 = single;
6465 b >> single;
fY1 = single;
6466 b >> single;
fX2 = single;
6467 b >> single;
fY2 = single;
6494 b >> single;
fWNDC = single;
6495 b >> single;
fHNDC = single;
6500 b >> single;
fUxmin = single;
6501 b >> single;
fUymin = single;
6502 b >> single;
fUxmax = single;
6503 b >> single;
fUymax = single;
6505 TVirtualPad::Streamer(b);
6506 TAttPad::Streamer(b);
6565 char drawoption[64];
6566 for (
Int_t i = 0; i < nobjects; i++) {
6591 b >> single;
fTheta = single;
6592 b >> single;
fPhi = single;
6656 while ((obj = next())) {
6740 if (!
gPad)
return 0;
6742 if (strlen(emode))
gROOT->SetEditorMode(emode);
6743 if (
gROOT->GetEditorMode() == 0 && strlen(pname) > 2)
gROOT->SetEditorMode(&pname[1]);
6747 TObject *oldlast =
gPad->GetListOfPrimitives()->Last();
6750 Bool_t hasname = strlen(pname) > 0;
6751 if (!pname[0] && !emode[0]) testlast =
kTRUE;
6752 if (testlast)
gROOT->SetEditorMode();
6754 if (
gROOT->GetEditorMode() == 0) {
6757 if (obj)
return obj;
6760 obj =
gPad->GetListOfPrimitives()->Last();
6761 if (obj != oldlast)
return obj;
6782 if (
gPad->IsBatch())
return 0;
6783 return (
TObject*)
gROOT->ProcessLineFast(
Form(
"new TGToolTip((TBox*)0x%lx,\"%s\",%d)",
6794 gROOT->ProcessLineFast(
Form(
"delete (TGToolTip*)0x%lx", (
Long_t)tip));
6805 gROOT->ProcessLineFast(
Form(
"((TGToolTip*)0x%lx)->Reset((TPad*)0x%lx)",
6816 gROOT->ProcessLineFast(
Form(
"((TGToolTip*)0x%lx)->Hide()",(
Long_t)tip));
6824 ::Info(
"TPad::x3d()",
"This function is deprecated. Use %s->GetViewer3D(\"x3d\") instead",this->
GetName());
6827 if (!type || !type[0]) {
6844 if ( (!type || !type[0] || (strstr(type,
"gl") && !strstr(type,
"ogl"))) && !
fCanvas->
UseGL())
6847 if (type && type[0]) {
6872 if (!strstr(type,
"pad")) {
6876 Warning(
"TPad::CreateViewer3D",
"Cannot create 3D viewer of type: %s", type);
6882 if (strstr(type,
"gl") && !strstr(type,
"ogl"))
6885 createdExternal =
kTRUE;
6901 if (createdExternal) {
6938 Emit(
"RecordPave(const TObject*)", (
Long_t)obj);
6946 Emit(
"RecordLatex(const TObject*)", (
Long_t)obj);
Style_t GetFrameFillStyle() const
Bool_t Collide(Int_t i, Int_t j, Int_t w, Int_t h)
Check if a box of size w and h collide some primitives in the pad at position i,j.
Bool_t fAbsCoord
Use absolute coordinates.
void FillCollideGridTGraph(TObject *o)
virtual const char * GetName() const
Returns name 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 void SetLineWidth(Width_t lwidth)
Set the line width.
TVirtualPad * GetPadSave() const
Get save pad.
Int_t VtoPixel(Double_t v) const
Double_t fPixeltoX
xworld = fPixeltoXk + fPixeltoX*xpixel
virtual void SetOpacity(Int_t percent)=0
Double_t fUymin
Minimum value on the Y axis.
void FeedbackMode(Bool_t set)
Turn rubberband feedback mode on or off.
double dist(Rotation3D const &r1, Rotation3D const &r2)
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 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.
Style_t GetTitleFont(Option_t *axis="X") const
Return title font.
TList * GetListOfBases()
Return list containing the TBaseClass(es) of a class.
virtual void SetAlpha(Float_t a)
void DrawCollideGrid()
This method draws the collide grid on top of the canvas.
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).
static void PolyLine(Int_t event, Int_t px, Int_t py, Int_t mode)
Create a new PolyLine in gPad.
Float_t GetLeftMargin() 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.
Double_t GetAbsYlowNDC() const
void SetPadGridX(Bool_t gridx)
virtual Double_t GetBinCenter(Int_t bin) const
Return bin center for 1D histogram.
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
TList * fPrimitives
->List of primitives (subpads)
virtual void ResizePad(Option_t *option="")
Compute pad conversion coefficients.
virtual void Draw(Option_t *option="")
Draw this pavetext with its current attributes.
Double_t Floor(Double_t x)
virtual void SetCursor(ECursor cursor)
Set cursor.
void SetPadLeftMargin(Float_t margin=0.1)
Float_t GetPadLeftMargin() const
Int_t GetFirst() const
Return first bin on the axis i.e.
Double_t YtoPad(Double_t y) const
Convert y from Y to pad.
ABC describing GUI independent main window (with menubar, scrollbars and a drawing area)...
virtual void DrawPolyLineNDC(Int_t n, const Double_t *u, const Double_t *v)=0
TVirtualPad * GetSelectedPad() const
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.
Int_t UtoPixel(Double_t u) const
TList * GetListOfPrimitives() const
TH1 * GetHistogram() const
Returns a pointer to the histogram used to draw the axis Takes into account the two following cases...
The Histogram stack class.
R__EXTERN Int_t gErrorIgnoreLevel
virtual void DrawCrosshair()
Function called to draw a crosshair in the canvas.
virtual Short_t GetBorderSize() const
virtual void SetLimits(Double_t xmin, Double_t xmax)
virtual TVirtualPad * GetPad(Int_t subpadnumber) const
Get a pointer to subpadnumber of this pad.
virtual TBox * AddBox(Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Add a new graphics box to this pavetext.
Color_t GetTitleTextColor() const
virtual void XYtoAbsPixel(Double_t x, Double_t y, Int_t &xpixel, Int_t &ypixel) const
virtual void SetBatch(Bool_t batch=kTRUE)
Set pad in batch mode.
virtual Color_t GetTextColor() const
Return the text color.
Bool_t fGridx
Set to true if grid along X.
Double_t fPhi
phi angle to view as lego/surface
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.
void CallRecursiveRemoveIfNeeded(TObject &obj)
call RecursiveRemove for obj if gROOT is valid and obj.TestBit(kMustCleanup) is true.
virtual void WCtoNDC(const Float_t *pw, Float_t *pn)=0
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Computes distance from point (px,py) to the object.
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 Bool_t CanLoopOnPrimitives() const
virtual void Paint(Option_t *option="")
Paint all primitives in pad.
virtual void SetBorderMode(Short_t bordermode)
virtual Short_t GetTextAlign() const
Return the text alignment.
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.
virtual Double_t GetBinLowEdge(Int_t bin) const
Return low edge of bin.
Int_t YtoPixel(Double_t y) const
virtual void UseCurrentStyle()
Replace current frame attributes by current style.
Int_t GetCanvasID() const
Get canvas identifier.
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".
virtual Bool_t IsRetained() const
Is pad retained ?
Int_t GetPixmapID() const
virtual Double_t GetNormFactor() const
TString & ReplaceAll(const TString &s1, const TString &s2)
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...
Float_t GetBottomMargin() const
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
Float_t fBottomMargin
BottomMargin.
Int_t fNumPaletteColor
Number of objects with an automatic color.
void PaintFillArea(Int_t n, Float_t *x, Float_t *y, Option_t *option="")
virtual void SetName(const char *name)
Set the name of the TNamed.
virtual void RangeChanged()
virtual void SetSelected(TObject *obj)
Set selected.
virtual void Draw(Option_t *option="")
Draw this legend with its current attributes.
THist< 1, float, THistStatContent, THistStatUncertainty > TH1F
static void SaveColor(std::ostream &out, Int_t ci)
Save a color with index > 228 as a C++ statement(s) on output stream out.
void PaintPolyLineNDC(Int_t n, Double_t *x, Double_t *y, Option_t *option="")
Paint polyline in CurrentPad NDC coordinates.
Short_t fBorderSize
pad bordersize in pixels
Int_t fCGnx
! Size of the collide grid along x
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
TObject * GetSelected() const
Get selected.
virtual void SetBBoxCenter(const TPoint &p)
Set center of the Pad.
Bool_t GetPadGridY() const
virtual void SetFixedAspectRatio(Bool_t fixed=kTRUE)
Fix pad aspect ratio to current value if fixed is true.
virtual Double_t GetSumOfWeights() const
Return the sum of weights excluding under/overflows.
virtual void SetBorderMode(Short_t bordermode)
virtual Double_t GetBinContent(Int_t bin) const
Return content of bin number bin.
virtual Float_t GetTextAngle() const
Return the text angle.
virtual TObject * Last() const
Return the last object in the list. Returns 0 when list is empty.
A TMultiGraph is a collection of TGraph (or derived) objects.
virtual ~TPad()
Pad destructor.
virtual Color_t GetHighLightColor() const
Get highlight color.
Double_t fAbsXlowNDC
Absolute X top left corner of pad in NDC [0,1].
virtual void AddFirst(TObject *obj)
Add object at the beginning of the list.
virtual TText * AddText(Double_t x1, Double_t y1, const char *label)
Add a new Text line to this pavetext at given coordinates.
virtual Bool_t IsVertical() const
void FillCollideGridTFrame(TObject *o)
Buffer base class used for serializing objects.
TList * fExecs
List of commands to be executed when a pad event occurs.
virtual void CopyPixmap()
Copy the pixmap of the pad to the canvas.
virtual TObject * FindObject(const char *name) const
Search if object named name is inside this pad or in pads inside this pad.
TPluginHandler * FindHandler(const char *base, const char *uri=0)
Returns the handler if there exists a handler for the specified URI.
TVirtualPad * GetPadSave() const
Int_t XtoPixel(Double_t x) const
Double_t GetAbsXlowNDC() const
if object in a pad cannot be picked
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.
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
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.
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
virtual void GetRangeAxis(Double_t &xmin, Double_t &ymin, Double_t &xmax, Double_t &ymax)
Return pad axis coordinates range.
Int_t GetPadTickY() const
Double_t fUxmax
Maximum value on the X axis.
Int_t LoadPlugin()
Load the plugin library for this handler.
Option_t * GetOption() const
void PaintBorder(Color_t color, Bool_t tops)
Paint the pad border.
void SetTitleFont(Style_t font=62, Option_t *axis="X")
static constexpr double ps
1-D histogram with a float per channel (see TH1 documentation)}
Int_t fCGny
! Size of the collide grid along y
Bool_t PlaceBox(TObject *o, Double_t w, Double_t h, Double_t &xl, Double_t &yb)
Place a box in NDC space.
Double_t fUymax
Maximum value on the Y axis.
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
TVirtualPad * GetSelectedPad() const
Get selected pad.
virtual void PaintModified()
Traverse pad hierarchy and (re)paint only modified pads.
R__EXTERN TVirtualMutex * gROOTMutex
virtual TH1 * DrawCopy(Option_t *option="", const char *name_postfix="_copy") const
Copy this histogram and Draw in the current pad.
virtual void Draw(Option_t *option="")
Default Draw method for all objects.
virtual void SetX1(Double_t x1)
virtual void SetFillStyle(Style_t fstyle)
Set the fill area style.
Double_t fVtoPixel
ypixel = fVtoPixelk + fVtoPixel*vndc
virtual void SetBBoxCenterX(const Int_t x)
Set X coordinate of the center of the Pad.
TObject * GetClickSelected() const
Double_t GetUxmin() const
Returns the minimum x-coordinate value visible on the pad. If log axis the returned value is in decad...
The histogram statistics painter class.
Double_t GetUxmax() const
Returns the maximum x-coordinate value visible on the pad. If log axis the returned value is in decad...
Option_t * GetOption() const
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
virtual TObject * GetParent() const
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.
Int_t fPadPaint
Set to 1 while painting the pad.
Double_t fPixeltoXk
Conversion coefficient for pixel to X World.
Float_t fTopMargin
TopMargin.
TString & Prepend(const char *cs)
virtual Double_t GetBinLowEdge(Int_t bin) const
Return bin lower edge for 1D histogram.
virtual void Modify()
Change current line attributes if necessary.
virtual void SetX2(Double_t x2)
Bool_t IsModified() const
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Double_t fAbsWNDC
Absolute Width of pad along X in NDC.
virtual Int_t GetEvent() const
Get Event.
void SetPadBottomMargin(Float_t margin=0.1)
Double_t fAbsPixeltoYk
Conversion coefficient for absolute pixel to Y World.
Double_t GetXlowNDC() const
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...
bit set when zooming on Y axis
virtual TVirtualPad * cd(Int_t subpadnumber=0)=0
virtual Width_t GetLineWidth() const
Return the line width.
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
Int_t fNumber
pad number identifier
virtual void AddLast(TObject *obj)
Add object at the end of the list.
Int_t GetHatchesLineWidth() const
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.
static constexpr double mg
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...
Double_t fAbsYlowNDC
Absolute Y top left corner of pad in NDC [0,1].
virtual TObject * FindObject(const char *name) const
Delete a TObjLink object.
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.
if object in a list can be deleted
virtual Double_t GetBinUpEdge(Int_t bin) const
Return up edge of bin.
TString & Replace(Ssiz_t pos, Ssiz_t n, const char *s)
Double_t GetHatchesSpacing() const
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.
virtual void SetTextFont(Font_t tfont=62)
Set the text font.
void SetClickSelected(TObject *obj)
virtual Style_t GetLineStyle() const
Return the line style.
virtual Int_t GetDimension() const
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 fYtoAbsPixelk
Conversion coefficient for Y World to absolute pixel.
virtual const char * ClassName() const
Returns name of class to which the object belongs.
Int_t fNextPaletteColor
Next automatic color.
void PaintDate()
Paint the current date and time if the option date is on.
virtual void Cleared(TVirtualPad *pad)
Emit pad Cleared signal.
virtual TVirtualPad * GetVirtCanvas() const
Get virtual canvas.
virtual void Close(Option_t *option="")
Delete all primitives in pad and pad itself.
R__EXTERN Int_t(* gThreadXAR)(const char *xact, Int_t nb, void **ar, Int_t *iret)
Bool_t GetPadGridX() const
virtual void Sleep(UInt_t milliSec)
Sleep milliSec milli seconds.
virtual Bool_t IsBatch() const
Is pad in batch mode ?
virtual const char * GetName() const =0
Returns name of object.
TFrame * GetFrame()
Get frame.
virtual void DrawLineNDC(Double_t u1, Double_t v1, Double_t u2, Double_t v2)=0
Int_t GetPadTickX() const
The TNamed class is the base class for all named ROOT classes.
virtual Float_t GetTextSize() const
Return the text size.
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.
Int_t fLogx
(=0 if X linear scale, =1 if log scale)
virtual Width_t GetLineWidth() const =0
TFrame * fFrame
! Pointer to 2-D frame (if one exists)
UInt_t GetWindowHeight() const
static Int_t GetMaxPickDistance()
Static function (see also TPad::SetMaxPickDistance)
Short_t GetBorderSize() const
void PaintTextNDC(Double_t u, Double_t v, const char *text)
Paint text in CurrentPad NDC coordinates.
virtual void Modify()
Change current fill area attributes if necessary.
Bool_t fEditable
True if canvas is editable.
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 canvas
virtual void SetCrosshair(Int_t crhair=1)
Set crosshair active/inactive.
const char * GetTitle() const
Returns title of object.
Double_t Log10(Double_t x)
UInt_t GetWw() const
Get Ww.
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)
TCanvasImp * GetCanvasImp() const
Get canvas implementation pointer if any.
void SetPadTickX(Int_t tickx)
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)
Set the marker color.
TString & Append(const char *cs)
void SetSelectedPad(TPad *pad)
Bool_t EndsWith(const char *pat, ECaseCompare cmp=kExact) const
Return true if string ends with the specified string.
static constexpr double L
virtual void ls(Option_t *option="") const
List all primitives in pad.
static void DrawColorTable()
Static function to Display Color Table in a pad.
Base class for several text objects.
Int_t fCrosshairPos
Position of crosshair.
Abstract 3D shapes viewer.
void SetTitleTextColor(Color_t color=1)
Int_t Finite(Double_t x)
Check if it is finite with a mask in order to be consistent in presence of fast math.
Double_t fAbsHNDC
Absolute Height of pad along Y in NDC.
TH1F * GetHistogram()
Returns a pointer to the histogram used to draw the axis.
Int_t fLogz
(=0 if Z linear scale, =1 if log scale)
virtual void SetLogx(Int_t value=1)
Set Lin/Log scale for X.
virtual Rectangle_t GetBBox()=0
virtual void SetFillColor(Color_t fcolor)=0
Int_t GetColorPalette(Int_t i) const
Return color number i in current palette.
virtual TObject * GetSelected() const
Get selected.
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 void SetBorderSize(Short_t bordersize)
virtual TPad * Pick(Int_t px, Int_t py, TObjLink *&pickobj)
Search for an object at pixel position px,py.
virtual void DestroyDrawable(Int_t device)=0
virtual void Draw(Option_t *option="")
Draw Pad in Current pad (re-parent pad if necessary).
virtual void Text(Double_t x, Double_t y, const char *string)=0
R__EXTERN TPluginManager * gPluginMgr
Double_t fYlowNDC
Y bottom left corner of pad in NDC [0,1].
object has not been deleted
virtual void SetEditable(Bool_t mode=kTRUE)
Set pad editable yes/no If a pad is not editable:
Bool_t OpaqueMoving() const
Is pad moving in opaque mode ?
virtual void SetTextAlign(Short_t align=11)
Set the text alignment.
virtual Short_t GetBorderSize() const =0
static Bool_t SupportAlpha()
Static function returning "true" if transparency is supported.
Double_t fX2
X of upper X coordinate.
virtual Option_t * GetDrawOption() const
Get option used by the graphics system to draw this object.
Int_t GetEventX() const
Get X event.
Int_t GetMaxIndex(Int_t dim) const
Return maximum index for array dimension "dim".
virtual void CopyPixmaps()
Copy the sub-pixmaps of the pad to the canvas.
void SetOptLogx(Int_t logx=1)
Double_t GetYlowNDC() const
Double_t fXtoPixel
xpixel = fXtoPixelk + fXtoPixel*xworld
Bool_t * fCollideGrid
! Grid used to find empty space when adding a box (Legend) in a pad
Double_t fPixeltoY
yworld = fPixeltoYk + fPixeltoY*ypixel
void PaintPolyLine(Int_t n, Float_t *x, Float_t *y, Option_t *option="")
Paint polyline in CurrentPad World coordinates.
Int_t GetEvent() const
Get Event.
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)
Set the line color.
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
! 3D View of this TPad
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...
Double_t fVtoPixelk
Conversion coefficient for V NDC to pixel.
Double_t fXtoAbsPixelk
Conversion coefficient for X World to absolute pixel.
virtual TCanvasImp * GetCanvasImp() const
Get canvas implementation pointer if any.
virtual void SetRange(Int_t first=0, Int_t last=0)
Set the viewing range for the axis from bin first to last.
TPad * fMother
! pointer to mother of the list
Double_t XtoPad(Double_t x) const
Convert x from X to pad.
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Execute action corresponding to one event.
virtual TVirtualPad * GetMother() const
Short_t GetBorderMode() const
virtual void SetDoubleBuffer(Int_t mode=1)
Set double buffer mode ON or OFF.
virtual Int_t GetPoint(Int_t i, Double_t &x, Double_t &y) const
Get x and y values for point number i.
virtual Int_t GetEventX() const
Get X event.
virtual void SetAttLinePS(Color_t color, Style_t style, Width_t lwidth)
Set postscript line attributes.
Int_t IncrementPaletteColor(Int_t i, TString opt)
Increment (i==1) or set (i>1) the number of autocolor in the pad.
virtual TObject * FindObject(const char *name) const
Must be redefined in derived classes.
void SetPadBorderMode(Int_t mode=1)
virtual void SetBottomMargin(Float_t bottommargin)
Set Pad bottom margin in fraction of the pad height.
virtual TObject * First() const
Return the first object in the list. Returns 0 when list is empty.
Int_t fPixmapID
! Off-screen pixmap identifier
virtual void DrawPolyLine(Int_t n, const Double_t *x, const Double_t *y)=0
virtual void SetCursor(ECursor cursor)
Set cursor type.
Int_t GetLast() const
Return last bin on the axis i.e.
virtual void DeleteToolTip(TObject *tip)
Delete tool tip object.
virtual Bool_t HasCrosshair() const
Return kTRUE if the crosshair has been activated (via SetCrosshair).
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)
Int_t GetPadBorderMode() const
Int_t YtoAbsPixel(Double_t y) const
Bool_t OpaqueResizing() const
Is pad resizing in opaque mode ?
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
virtual void SetBBoxX1(const Int_t x)=0
void inv(rsa_NUMBER *, rsa_NUMBER *, rsa_NUMBER *)
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 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 Font_t GetTextFont() const
Return the text font.
Long_t ExecPlugin(int nargs, const T &... params)
virtual TPoint GetBBoxCenter()
Return the center of the Pad as TPoint in pixels.
virtual Bool_t IsEditable() const
Float_t GetPadBottomMargin() const
virtual TObject * Remove(TObject *obj)
Remove object from the list.
UInt_t GetWh() const
Get Wh.
virtual void UseCurrentStyle()
Force a copy of current style for all objects in pad.
Float_t GetPadRightMargin() const
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
virtual void SetTextAngle(Float_t tangle=0)
Set the text angle.
virtual TObject * GetPrimitive(const char *name) const
Get primitive.
Double_t GetAbsWNDC() const
virtual void SetBBoxY2(const Int_t y)
Set bottom of BoundingBox to a value (resize in y direction on bottom)
virtual UInt_t GetWh() const
Get Wh.
TView * fView
! Pointer to 3-D view (if one exists)
void PaintPolyMarker(Int_t n, Float_t *x, Float_t *y, Option_t *option="")
Paint polymarker in CurrentPad World coordinates.
const char * AsSQLString() const
Return the date & time in SQL compatible string format, like: 1997-01-15 20:16:28.
void CopyBackgroundPixmap(Int_t x, Int_t y)
Copy pixmap of this pad as background of the current pad.
virtual void SetView(TView *view=0)
Set the current TView. Delete previous view if view=0.
Width_t fLineWidth
Line width.
static TVirtualViewer3D * Viewer3D(TVirtualPad *pad=0, Option_t *type="")
Create a Viewer 3D of specified type.
The most important graphics class in the ROOT system.
virtual void SetLineColor(Color_t lcolor)=0
virtual Bool_t BuildingScene() const =0
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
char * Form(const char *fmt,...)
virtual void ResetToolTip(TObject *tip)
Reset tool tip, i.e.
virtual void SetAttMarkerPS(Color_t color, Style_t style, Size_t msize)
Set postscript marker attributes.
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.
static void IndentLevel()
Functions used by ls() to indent an object hierarchy.
Int_t GetArrayDim() const
Return number of array dimensions.
The ROOT global object gROOT contains a list of all defined classes.
virtual void SetMarkerStyle(Style_t mstyle=1)
Set the marker style.
void PaintLine3D(Float_t *p1, Float_t *p2)
Paint 3-D line in the CurrentPad.
virtual Int_t GetNumber() const =0
virtual TObject * After(const TObject *obj) const
Returns the object after object obj.
virtual Int_t Exec(const char *shellcmd)
Execute a command.
static double p1(double t, double a, double b)
virtual TObject * At(Int_t idx) const
Returns the object at position idx. Returns 0 if idx is out of range.
Float_t fLeftMargin
LeftMargin.
virtual TCanvas * GetCanvas() const
virtual void Print(const char *filename="") const
Save Pad contents in a file in one of various formats.
virtual void SetCanvasSize(UInt_t ww, UInt_t wh)
Set canvas size.
Double_t fYtoPixel
ypixel = fYtoPixelk + fYtoPixel*yworld
virtual TVirtualPadPainter * GetPainter()
Get pad painter from TCanvas.
virtual void ReadFastArray(Bool_t *b, Int_t n)=0
Int_t GetNumberOfColors() const
Return number of colors in the color palette.
Bool_t fModified
Set to true when pad is modified.
virtual Int_t GetDistancetoAxis(Int_t axis, Int_t px, Int_t py, Double_t &ratio)=0
if object destructor must call RecursiveRemove()
virtual void SetMarkerSize(Size_t msize=1)
Set the marker size.
Int_t fCrosshair
Crosshair type (0 if no crosshair requested)
Each class (see TClass) has a linked list of its base class(es).
virtual Double_t GetY1() const =0
virtual TObjLink * FirstLink() const
TPad()
Pad default constructor.
void LineNotFree(Int_t x1, Int_t x2, Int_t y1, Int_t y2)
Mark as "not free" the cells along a line.
Color_t GetTitleFillColor() const
Double_t fUtoAbsPixelk
Conversion coefficient for U NDC to absolute pixel.
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...
Color_t GetHighLightColor() const
Get highlight color.
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.
Double_t fY2
Y of upper Y coordinate.
virtual void ResizePad()=0
virtual void BeginScene()=0
Double_t fAspectRatio
ratio of w/h in case of fixed ratio
virtual Color_t GetLineColor() const
Return the line color.
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 Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=0)=0
Width_t GetTitleBorderSize() 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.
void FillCollideGridTBox(TObject *o)
virtual Double_t GetBinWidth(Int_t bin) const
Return bin width for 1D histogram.
static const double x1[5]
Double_t fVtoAbsPixelk
Conversion coefficient for V NDC to absolute pixel.
A Pave (see TPave) with text, lines or/and boxes inside.
void SetClickSelectedPad(TPad *pad)
Double_t fXtoPixelk
Conversion coefficient for X World to pixel.
virtual Double_t GetBinErrorLow(Int_t bin) const
Return lower error associated to bin number bin.
TH1F * GetHistogram() const
Returns a pointer to the histogram used to draw the axis Takes into account the two following cases...
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.
virtual void ls(Option_t *option="") const
List (ls) all objects in this collection.
virtual Int_t GetEventY() const
Get Y event.
TVirtualPad * GetClickSelectedPad() const
UInt_t GetWindowWidth() const
Wrapper around a TObject so it can be stored in a TList.
Bool_t fGridy
Set to true if grid along Y.
void SetCanvasSize(UInt_t ww, UInt_t wh)
Set Width and Height of canvas to ww and wh respectively.
Print a TSeq at the prompt:
virtual void SetFillStyle(Style_t fstyle)
Override TAttFill::FillStyle for TPad because we want to handle style=0 as style 4000.
Bool_t IsBatch() const
Is pad in batch mode ?
Float_t GetPadTopMargin() const
static void Pad(Int_t event, Int_t px, Int_t py, Int_t)
Create a new pad in gPad.
Double_t fTheta
theta angle to view as lego/surface
virtual void SetTextSize(Float_t tsize=1)=0
Bool_t IsGrayscale()
Check whether this canvas is to be drawn in grayscale mode.
virtual Color_t GetFillColor() const
Return the fill area color.
virtual void GetRange(Double_t &x1, Double_t &y1, Double_t &x2, Double_t &y2)
Return pad world coordinates range.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
virtual void SetBBoxY1(const Int_t y)=0
const char * AsString() const
Return the date & time as a string (ctime() format).
#define R__LOCKGUARD(mutex)
The color creation and management class.
void Browse(TBrowser *b)
Browse this collection (called by TBrowser).
virtual void SetBBoxY1(const Int_t y)
Set top of BoundingBox to a value (resize in y direction on top)
void FillCollideGridTH1(TObject *o)
Int_t fTickx
Set to 1 if tick marks along X.
virtual TPoint GetBBoxCenter()=0
Int_t GetCrosshair() const
Return the crosshair type (from the mother canvas) crosshair type = 0 means no crosshair.
static TClass * GetClass(const char *name, Bool_t load=kTRUE, Bool_t silent=kFALSE)
Static method returning pointer to TClass of the specified class name.
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.
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)
Set the line style.
Width_t GetPadBorderSize() const
void SetPadTopMargin(Float_t margin=0.1)
TVirtualViewer3D * fViewer3D
! Current 3D viewer
Color_t GetFrameLineColor() const
virtual void SetBBoxX2(const Int_t x)
Set right hand side of BoundingBox to a value (resize in x direction on right)
virtual void Draw(Option_t *option="")
Draw this box with its current attributes.
Int_t GetEventY() const
Get Y event.
virtual void SetRightMargin(Float_t rightmargin)
Set Pad right margin in fraction of the pad width.
virtual Style_t GetLineStyle() const =0
Double_t fXlowNDC
X bottom left corner of pad in NDC [0,1].
Double_t GetAbsHNDC() const
Float_t fRightMargin
RightMargin.
Mother of all ROOT objects.
virtual Int_t FindFixBin(Double_t x) const
Find bin number corresponding to abscissa x.
Bool_t fFixedAspectRatio
True if fixed aspect ratio.
void Clear(Option_t *option="")
Delete all pad primitives.
virtual Bool_t OpaqueMoving() const
Is pad moving in opaque mode ?
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.
TObject * GetObject() const
static Int_t IncreaseDirLevel()
Increase the indentation level for ls().
virtual void SetDoubleBuffer(Int_t mode=1)
Set Double Buffer On/Off.
Double_t GetUymax() const
Returns the maximum y-coordinate value visible on the pad. If log axis the returned value is in decad...
virtual void DrawPolyMarker(Int_t n, const Double_t *x, const Double_t *y)=0
virtual void Browse(TBrowser *b)
Browse pad.
virtual void RecordPave(const TObject *obj)
Emit RecordPave() signal.
virtual TLegend * BuildLegend(Double_t x1=0.3, Double_t y1=0.21, Double_t x2=0.3, Double_t y2=0.21, const char *title="", Option_t *option="")
Build a legend from the graphical objects in the pad.
const char * GetName() const
Returns name of object.
Int_t XtoAbsPixel(Double_t x) const
Float_t GetTopMargin() 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 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 Int_t GetMinimumBin() const
Return location of bin with minimum value in the range.
virtual void ReleaseViewer3D(Option_t *type="")
Release current (external) viewer.
virtual void SetBBoxCenterX(const Int_t x)=0
virtual UInt_t GetWw() const
Get Ww.
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.
Double_t fYtoPixelk
Conversion coefficient for Y World to pixel.
Width_t GetFrameBorderSize() 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.
virtual Short_t GetBorderMode() const
A Graph is a graphics object made of two arrays X and Y with npoints each.
Int_t NextPaletteColor()
Get the next autocolor in the pad.
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
void SetOptLogy(Int_t logy=1)
Double_t Ceil(Double_t x)
Style_t GetFrameLineStyle() const
virtual void DrawPS(Int_t n, Float_t *xw, Float_t *yw)=0
Double_t fHNDC
Height of pad along Y in NDC.
R__EXTERN TVirtualPS * gVirtualPS
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)
Set the text color.
virtual TObject * CreateToolTip(const TBox *b, const char *text, Long_t delayms)
Create a tool tip and return its pointer.
virtual void EndScene()=0
Double_t PadtoY(Double_t y) const
Convert y from pad to Y.
virtual Double_t GetBinErrorUp(Int_t bin) const
Return upper error associated to bin number bin.
virtual void Pop()
Pop pad to the top of the stack.
virtual TObjLink * LastLink() const
Bool_t IsRetained() const
Is pad retained ?
virtual void SetAttTextPS(Int_t align, Float_t angle, Color_t color, Style_t font, Float_t tsize)
Set postscript text attributes.
TObject * fPadPointer
! free pointer
virtual Rectangle_t GetBBox()
Return the bounding Box of the Pad.
virtual Bool_t OpaqueResizing() const
Is pad resizing in opaque mode ?
void SetPadTickY(Int_t ticky)
Color_t GetFrameFillColor() const
Width_t GetFrameLineWidth() const
void SetBatch(Bool_t batch=kTRUE)
Toggle batch mode.
void Emit(const char *signal, const T &arg)
Activate signal with single parameter.
Double_t fUtoPixelk
Conversion coefficient for U NDC to pixel.
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)
Double_t fPixeltoYk
Conversion coefficient for pixel to Y World.
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.
virtual Int_t GetNbinsX() const
Double_t Sqrt(Double_t x)
virtual Style_t GetFillStyle() const
Return the fill area style.
virtual void SetTextSize(Float_t tsize=1)
Set the text size.
virtual void SaveAs(const char *filename="", Option_t *option="") const
Save Pad contents in a file in one of various formats.
virtual void Update()
Update canvas pad buffers.
Double_t PadtoX(Double_t x) const
Convert x from pad to X.
Draw all kinds of Arrows.
Double_t fY1
Y of lower Y coordinate.
Int_t fGLDevice
! OpenGL off-screen pixmap identifier
virtual Bool_t IsTransparent() const
virtual const char * GetName() const
Returns name of object.
RooCmdArg FillStyle(Style_t style)
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
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
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 void SetLogz(Int_t value=1)
Set Lin/Log scale for Z.
Double_t fX1
X of lower X coordinate.
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="")
Set the title of the TNamed.
TList * GetListOfFunctions() const
TObject * fTip
! tool tip associated with box
TList * GetListOfMethods(Bool_t load=kTRUE)
Return list containing the TMethods of a class.
virtual void SetFillStyle(Style_t fstyle)=0
virtual void SetY1(Double_t y1)
virtual void x3d(Option_t *type="")
Deprecated: use TPad::GetViewer3D() instead.
static Bool_t ContainsTImage(TList *li)
Auxiliary function.
virtual Int_t GetValue(const char *name, Int_t dflt) const
Returns the integer value for a resource.
void PaintLine(Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Paint line in CurrentPad World coordinates.
Double_t AbsPixeltoY(Int_t py)
Int_t Nint(T x)
Round to nearest integer. Rounds half integers to the nearest even integer.
Double_t fUxmin
Minimum value on the X axis.
virtual void CopyDrawable(Int_t device, Int_t px, Int_t py)=0
virtual Int_t GetMaximumBin() const
Return location of bin with maximum value in the range.
Double_t GetUymin() const
Returns the minimum y-coordinate value visible on the pad. If log axis the returned value is in decad...
Int_t fTicky
Set to 1 if tick marks along Y.
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
clip to the frame boundary
virtual void RangeAxisChanged()
virtual Color_t GetLineColor() const =0
Float_t GetRightMargin() const
void Modified(Bool_t flag=1)
Int_t GetFrameBorderMode() const
Bool_t HasFixedAspectRatio() const
To make it possible to use GL for 2D graphic in a TPad/TCanvas.
static Int_t fgMaxPickDistance
Maximum Pick Distance.
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.
Double_t fUtoPixel
xpixel = fUtoPixelk + fUtoPixel*undc
void FillCollideGrid(TObject *o)
Initialise the grid used to find empty space when adding a box (Legend) in a pad. ...
virtual void SetBorderSize(Int_t bordersize=4)
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
TAxis * GetXaxis()
Get the behaviour adopted by the object about the statoverflows. See EStatOverflows for more informat...
Short_t fBorderMode
Bordermode (-1=down, 0 = no border, 1=up)
Double_t fAbsPixeltoXk
Conversion coefficient for absolute pixel to X World.
void SetObject(TObject *obj)
Int_t fLogy
(=0 if Y linear scale, =1 if log scale)
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.
virtual const char * GetTitle() const
Returns title of object.
This class stores the date and time with a precision of one second in an unsigned 32 bit word (950130...
Double_t fWNDC
Width of pad along X in NDC.
virtual void SetBBoxCenterY(const Int_t y)=0
Style_t fFillStyle
Fill area style.
virtual Int_t GetCanvasID() const
Get canvas identifier.
virtual void RecordLatex(const TObject *obj)
Emit RecordLatex() signal.
Int_t GetOptTitle() const
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.
Int_t GetBorderSize() const
Color_t GetPadColor() const
const char * Data() const
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.