56   : 
TNamed ("Spectrum Painter2","Miroslav Morhac Painter")
 
   60   gPad->Range(0, 0, 1 ,1);
 
   62   fXmax = h2->GetNbinsX() - 1;
 
   64   fYmax = h2->GetNbinsY() - 1;
 
   66   fMaximumXScreenResolution = bs;
 
   68   for (i = 0;i <= fXmax; i++) {
 
   69      for (j = 0;j <= fYmax; j++) {
 
   70         val = h2->GetBinContent(i + 1,j + 1);
 
   71         if (val > fZmax) fZmax = val;
 
   75   fBx1 = 
gPad->XtoPixel(0.1); 
 
   76   fBx2 = 
gPad->XtoPixel(0.99);
 
   77   fBy1 = 
gPad->YtoPixel(0.99);
 
   78   fBy2 = 
gPad->YtoPixel(0.05);
 
   80   fModeGroup = kModeGroupLightHeight;
 
   82   fDisplayMode = kDisplayModeSurface;
 
   84   fZscale = kZScaleLinear; 
 
   86   fNodesx = fXmax-fXmin+1; 
 
   87   fNodesy = fYmax-fYmin+1; 
 
  115   fColorAlg = kColorAlgRgbSmooth; 
 
  137   fShadow   = kShadowsNotPainted; 
 
  146   fBezier   = kNoBezierInterpol; 
 
  152   fPenDash  = kPenStyleSolid; 
 
  154   fChanmarkEnDis  = kChannelMarksNotDrawn; 
 
  156   fChanmarkColor  = 
kBlue;                 
 
  159   fChanmarkStyle  = kChannelMarksStyleDot; 
 
  161   fChanlineEnDis   = kChannelGridNotDrawn; 
 
  163   fChanlineColor   = 
kRed;                 
 
  165   fEnvelope        = 
new Short_t [fMaximumXScreenResolution];
 
  166   fEnvelopeContour = 
new Short_t [fMaximumXScreenResolution];
 
  167   for (i=0;i<fMaximumXScreenResolution;i++) {
 
  169      fEnvelopeContour[i] = fBy2;
 
  181   for (
int i=0; i<256; i++) {
 
  209   if ((zmt==0)||(zmt==-3)||(zmt==-4)) {
 
  216         if (zf>=1.0) zf = log(zf);
 
  220         if (zf>0) zf = sqrt(zf);
 
  249   Double_t da,db,dc=0,dd,dl,dm,dn,xtaz,ytaz,ztaz,
v=0,
v1;
 
  254         if (z1>900) z1 = 900;
 
  256         if (z2>900) z2 = 900;
 
  258         if (z3>900) z3 = 900;
 
  269   if ((i==1)||(i==3)) {
 
  280   xtaz = (dx1+dx2+dx3)/3;
 
  281   ytaz = (dy1+dy2+dy3)/3;
 
  287      da = (dy2-dy1)*(z3-z1)-(dy3-dy1)*(z2-z1);
 
  288      db = (z2-z1)*(dx3-dx1)-(z3-z1)*(dx2-dx1);
 
  289      dc = (dx2-dx1)*(dy3-dy1)-(dx3-dx1)*(dy2-dy1);
 
  290      dd = (da*da+db*db+dc*dc)*(dl*dl+dm*dm+dn*dn);
 
  292      if (dd!=0) 
v = (da*dl+db*dm+dc*dn)/dd;
 
  310               if (da>=1) da=log(da);
 
  311               if (db>=1) db=log(db);
 
  330      da = (dy2-dy1)*(z3-z1)-(dy3-dy1)*(z2-z1);
 
  331      db = (z2-z1)*(dx3-dx1)-(z3-z1)*(dx2-dx1);
 
  332      dc = (dx2-dx1)*(dy3-dy1)-(dx3-dx1)*(dy2-dy1);
 
  333      dd = (da*da+db*db+dc*dc)*(dl*dl+dm*dm+dn*dn);
 
  335      if (dd!=0) 
v = (da*dl+db*dm+dc*dn)/dd;
 
  352               if (da>=1) da = log(da);
 
  353               if (db>=1) db = log(db);
 
  354               if (da!=0) dc = db/da;
 
  393   Double_t pom1,pom2,sdx1=0,sdx2=0,sdy1,sdy2,spriz;
 
  396         if (ztaz>900) ztaz = 900;
 
  398         if (ztaz>32767) ztaz = 32767;
 
  414      if (sx1<sx2) skrokx =  1;
 
  416      if (sy1<sy2) skroky =  1;
 
  420      if (
TMath::Abs(pom1)>0.0000001) sdx1 = pom2/pom1;
 
  423      sdy1 = pom2-sdx1*pom1;
 
  426      if (
TMath::Abs(pom1)>0.0000001) sdx2 = pom2/pom1;
 
  429      sdy2  = pom2-sdx2*pom1;
 
  432      pom2  = pom1*sdx1+sdy1;
 
  434      for (;(sx1>(
fXmin-skrokx)) && (sx1<(
xmax-skrokx)) &&
 
  435            (sy1>(
fYmin-skroky)) && (sy1<(
ymax-skroky)) &&
 
  436            (spriz==0);sx1+=skrokx) {
 
  438         pom2 = pom1*sdx1+sdy1;
 
  442            pom2 = pom1*sdx2+sdy2;
 
  443            sz2  = (
Int_t)(pom2+shad_noise);
 
  444            if (sz1>sz2) spriz = 1;
 
  447   } 
else if (sy1!=sy2) {
 
  448      if (sy1<sy2) skroky =  1;
 
  452      if (
TMath::Abs(pom1)>0.0000001) sdx2 = pom2/pom1;
 
  455      sdy2  = pom2-sdx2*pom1;
 
  457      for (;(sy1>(
fYmin-skroky)) && (sy1<(
ymax-skroky)) &&
 
  458            (spriz==0);sy1+=skroky) {
 
  461         pom2 = pom1*sdx2+sdy2;
 
  462         sz2  = (
Int_t)(pom2+shad_noise);
 
  463         if (sz1>sz2) spriz=1;
 
  479   unsigned long uinc1=0,uinc2=0,uinc3=0,upom,i;
 
  484   else if (iv>255) iv = 255;
 
  485   if (
gROOT->GetColor(250+iv)) {
 
  493      if (
a >= UINT_MAX) uinc1 = UINT_MAX;
 
  494      else               uinc1 = (unsigned)
a;
 
  496      i     = (uinc1-upom)/256;
 
  497      if ((i%2)==0) uinc1 = upom;
 
  498      else          uinc1 = 255-upom;
 
  504      i     = (uinc2-upom)/256;
 
  505      if ((i%2)==0) uinc2 = upom;
 
  506      else          uinc2 = 255-upom;
 
  512      i     = (uinc3-upom)/256;
 
  513      if ((i%2)==0) uinc3 = upom;
 
  514      else          uinc3 = 255-upom;
 
  533         uinc2 = (
Int_t)green;
 
  542         red   = 
a+0.956*
b+0.62*
c;
 
  543         green = 
a-0.272*
b-0.647*
c;
 
  544         blue  = 
a-1.108*
b+1.705*
c;
 
  545         if (red>=2)       red   = red-2;
 
  546         else if (red>=1)  red   = 2-red;
 
  547         if (green<0)      green = -green;
 
  548         if (blue>=2)      blue  = blue-2;
 
  549         else if (blue>=1) blue  = 2-blue;
 
  550         else if (blue<-1) blue  = 2+blue;
 
  551         else if (blue<0)  blue  = -blue;
 
  556         uinc2 = (
Int_t)green;
 
  614         uinc2 = (
Int_t)green;
 
  617      ui = uinc1+uinc2*256+uinc3*65536;
 
  652         uinc2 = (
Int_t)green;
 
  661         red   = 
a+0.956*
b+0.62*
c;
 
  662         green = 
a-0.272*
b-0.647*
c;
 
  663         blue  = 
a-1.108*
b+1.705*
c;
 
  664         if (red>=2)       red   = red-2;
 
  665         else if (red>=1)  red   = red-1;
 
  666         if (green<0)      green = 1+green;
 
  667         if (blue>=2)      blue  = blue-2;
 
  668         else if (blue>=1) blue  = blue-1;
 
  669         else if (blue<-1) blue  = 2+blue;
 
  670         else if (blue<0)  blue  = 1+blue;
 
  675         uinc2 = (
Int_t)green;
 
  733         uinc2 = (
Int_t)green;
 
  736      ui = uinc1+uinc2*256+uinc3*65536;
 
  757   for (j=i+1;j<=3;j++) 
a = 
a*j;
 
  758   for (j=1;j<=3-i;j++) 
a = 
a/j;
 
  771   for (j=1;j<=i;j++)   
v = 
v*bezf;
 
  772   for (j=1;j<=3-i;j++) 
v = 
v*(1-bezf);
 
  801   Int_t x,
y,krok,xold=0,yold=0,prvy,yprv=0;
 
  862   krok  = (
x1<
x2)? 1:-1;
 
  914   Int_t x,
y,krok,xold=0,yold=0,prvy,xprv,yprv=0;
 
  949   krok  = (
x1<
x2)? 1:-1;
 
 1087   Int_t krok,xi,yi,xj,yj,
a,
b,as,bs,pr,ae,be;
 
 1100   krok = (xi<xj)? 1:-1;
 
 1117      if (yi!=yj) 
b += (yi<yj)? +1:-1;
 
 1134                      gPad->PixeltoX(ae),
gPad->PixeltoY(be)+1);
 
 1151      for (
a=xi;
a<=xj;
a++) {
 
 1157      for (
a=xj;
a<=xi;
a++) {
 
 1588   Int_t q1=0,q2=0,qv=0,smer=0,flag=0,i=0,j=0,
x1=0,
y1=0,
x2=0,
y2=0,
x3=0,y3=0,
x4=0,y4=0,uhl=0,xp1=0,yp1=0,xp2=0,yp2=0;
 
 1589   Int_t ix5,iy5,x6,y6,x7,y7,y8,x1d,y1d,x2d=0,y2d=0;
 
 1590   Int_t i1=0,i2=0,i3=0,i4=0,j1=0,j2=0,j3=0,j4=0;
 
 1591   Int_t s1=0,s2=0,s3=0,s4=0,
t1=0,t2=0,t3=0,t4=0;
 
 1592   Double_t dx1,dx2,dx3,dx4,dy1,dy2,dy3,dy4,z1,z2,z3,z4,zl,zh;
 
 1593   Double_t xa,xb=0,ya,yb=0,x5=0,y5=0;
 
 1594   Double_t da=0,db=0,dc=0,dd=0,xtaz,ytaz,ztaz,
v,shad_noise;
 
 1595   Int_t iv=0,ekv,stvor,sx1,sx2,sx3,sx4,sx5,sy1,sy2,sy3,sy4,sy5;
 
 1596   Double_t pom1,pom2,sdx1,sdy1,sdx2=0,sdy2,sdx3,sdy3,sdy4,spriz;
 
 1597   Int_t sr1=0,sr2=0,sr3=0,sr4=0,sr5=0,sr6=0,sr7=0,sr8=0;
 
 1598   Int_t tr1=0,tr2=0,tr3=0,tr4=0,tr5=0,tr6=0,tr7=0,tr8=0;
 
 1599   Int_t il,iv1=0,iv2=0,iv3=0,iv4=0;
 
 1600   Double_t v1=0,
v2=0,
v3=0,
v4=0,dxr1,dxr2,dyr1,dyr2,zr1,zr2,bezf;
 
 1601   Double_t dcount_reg,z1l,z2l,z3l,z4l,sdx2p,sdy2p,dap,dbp,dcp,ddp;
 
 1602   Int_t sx1p,sy1p,sx3p,uip=0;
 
 1604   Double_t p000x,p000y,p100x,p100y,p010x,p010y,p110x,p110y;
 
 1605   Double_t p001x,p001y,p101x,p101y,p011x,p011y,p111x,p111y;
 
 1606   Int_t ibezx1=0,ibezy1=0,ibezx2,ibezy2;
 
 1607   unsigned ui1,ui2,ui3;
 
 1608   Double_t fi,alfa,beta,x3max,y3max,mul,movx,movy;
 
 1610   Double_t mxx,mxy,myx,myy,myz,px,py,kx,ky;
 
 1611   Double_t bxl,bxh,byl,byh,xd,yd,
a,
b,rotx,roty;
 
 1621      printf(
"The canvas size exceed the maximum X screen resolution.\n");
 
 1622      printf(
"Use the option bf() to increase the buffer size (it should be greater than %d).\n",
fBx2);
 
 1657   alfa  = (
fAlpha*3.1415927)/180;
 
 1658   beta  = (
fBeta*3.1415927)/180;
 
 1667   mx    = (bxh-bxl)/(x3max*(cos(alfa)+cos(beta)));
 
 1668   my    = (bxh-bxl)/(y3max*(cos(alfa)+cos(beta)));
 
 1669   mul   = (byh-byl)/(bxh-bxl);
 
 1670   movx  = bxl+my*cos(alfa)*y3max;
 
 1671   mxx   = 
mx*cos(beta)*cos(fi)-my*cos(alfa)*sin(fi);
 
 1672   mxy   = (-1)*
mx*cos(beta)*sin(fi)-my*cos(alfa)*cos(fi);
 
 1673   myx   = mul*(
mx*sin(beta)*cos(fi)+my*sin(alfa)*sin(fi));
 
 1674   myy   = mul*((-1)*
mx*sin(beta)*sin(fi)+my*sin(alfa)*cos(fi));
 
 1675   px    = rotx*
mx*cos(beta)-roty*my*cos(alfa)+movx;
 
 1690      mz     = (bxh-bxl)*(cos(alfa)+cos(beta)-sin(alfa)-sin(beta));
 
 1691      mz     = mz/((zmax-zmin)*(cos(alfa)+cos(beta)));
 
 1692      movy   = byl+mul*mz*zmax;
 
 1694      py     = mul*(rotx*
mx*sin(beta)+roty*my*sin(alfa))+movy;
 
 1699      if (zmin>=1) zmin = log(zmin);
 
 1701      if (zmax>=1) zmax = log(zmax);
 
 1703      if ((zmax-zmin)<0.000001) zmax = zmin+0.000001;
 
 1704      mz     = (bxh-bxl)*(cos(alfa)+cos(beta)-sin(alfa)-sin(beta));
 
 1705      mz     = mz/((zmax-zmin)*(cos(alfa)+cos(beta)));
 
 1706      movy   = byl+mul*mz*zmax;
 
 1708      py     = mul*(rotx*
mx*sin(beta)+roty*my*sin(alfa))+movy;
 
 1713      if (zmin>=1) zmin = sqrt(zmin);
 
 1715      if (zmax>=1) zmax = sqrt(zmax);
 
 1717      if ((zmax-zmin)<0.000001) zmax = zmin+0.000001;
 
 1718      mz     = (bxh-bxl)*(cos(alfa)+cos(beta)-sin(alfa)-sin(beta));
 
 1719      mz     = mz/((zmax-zmin)*(cos(alfa)+cos(beta)));
 
 1720      movy   = byl+mul*mz*zmax;
 
 1722      py     = mul*(rotx*
mx*sin(beta)+roty*my*sin(alfa))+movy;
 
 1732         dcount_reg=log(dcount_reg);
 
 1735         dcount_reg=sqrt(dcount_reg);
 
 1746   p000y = 
gPad->PixeltoY(
fYt)+1;
 
 1749   p100y = 
gPad->PixeltoY(
fYt)+1;
 
 1752   p010y = 
gPad->PixeltoY(
fYt)+1;
 
 1755   p110y = 
gPad->PixeltoY(
fYt)+1;
 
 1759   p001y = 
gPad->PixeltoY(
fYt)+1;
 
 1762   p101y = 
gPad->PixeltoY(
fYt)+1;
 
 1765   p011y = 
gPad->PixeltoY(
fYt)+1;
 
 1768   p111y = 
gPad->PixeltoY(
fYt)+1;
 
 1769   Double_t bmin, bmax, binLow, binHigh, binWidth;
 
 1770   Double_t axisLevel, gridDist, gridY1, gridY2;
 
 1771   Int_t ndivx = 0, ndivy, ndivz, nbins;
 
 1778      axis->
PaintAxis(p000x, p000y, p100x, p100y, bmin, bmax, ndivx, 
"");
 
 1779      axis->
PaintAxis(p000x, p000y, p010x, p010y, bmin, bmax, ndivx, 
"");
 
 1781         axis->
PaintAxis(p000x, p000y, p001x, p001y, bmin, bmax, ndivx, 
"");
 
 1783         axis->
PaintAxis(p100x, p100y, p101x, p101y, bmin, bmax, ndivx, 
"");
 
 1784      axis->
PaintAxis(p101x, p101y, p001x, p001y, bmin, bmax, ndivx, 
"");
 
 1785      axis->
PaintAxis(p001x, p001y, p011x, p011y, bmin, bmax, ndivx, 
"");
 
 1791                                  nbins, binWidth, 
" ");
 
 1792         for (i = 0; i < nbins + 1; i++) {
 
 1793            axisLevel = binLow+i*binWidth;
 
 1794            gridDist  = (axisLevel-bmin)*(p001y-p000y)/(bmax-bmin);
 
 1795            gridY1    = p000y + gridDist, gridY2 = p100y + gridDist;
 
 1797            gridY2    = p010y + gridDist;
 
 1802      axis->
PaintAxis(p010x, p010y, p000x, p000y, bmin, bmax, ndivx, 
"");
 
 1803      axis->
PaintAxis(p010x, p010y, p110x, p110y, bmin, bmax, ndivx, 
"");
 
 1805         axis->
PaintAxis(p010x, p010y, p011x, p011y, bmin, bmax, ndivx, 
"");
 
 1807         axis->
PaintAxis(p000x, p000y, p001x, p001y, bmin, bmax, ndivx, 
"");
 
 1808      axis->
PaintAxis(p001x, p001y, p011x, p011y, bmin, bmax, ndivx, 
"");
 
 1809      axis->
PaintAxis(p011x, p011y, p111x, p111y, bmin, bmax, ndivx, 
"");
 
 1815                                  nbins, binWidth, 
" ");
 
 1816         for (i = 0; i < nbins + 1; i++) {
 
 1817            axisLevel = binLow+i*binWidth;
 
 1818            gridDist  = (axisLevel-bmin)*(p011y-p010y)/(bmax-bmin);
 
 1819            gridY1    = p010y + gridDist, gridY2 = p000y + gridDist;
 
 1821            gridY2    = p110y + gridDist;
 
 1826      axis->
PaintAxis(p110x, p110y, p010x, p010y, bmin, bmax, ndivx, 
"");
 
 1827      axis->
PaintAxis(p110x, p110y, p100x, p100y, bmin, bmax, ndivx, 
"");
 
 1829         axis->
PaintAxis(p110x, p110y, p111x, p111y, bmin, bmax, ndivx, 
"");
 
 1831         axis->
PaintAxis(p010x, p010y, p011x, p011y, bmin, bmax, ndivx, 
"");
 
 1832      axis->
PaintAxis(p011x, p011y, p111x, p111y, bmin, bmax, ndivx, 
"");
 
 1833      axis->
PaintAxis(p111x, p111y, p101x, p101y, bmin, bmax, ndivx, 
"");
 
 1839                                  nbins, binWidth, 
" ");
 
 1840         for (i = 0; i < nbins + 1; i++) {
 
 1841            axisLevel = binLow+i*binWidth;
 
 1842            gridDist  = (axisLevel-bmin)*(p111y-p110y)/(bmax-bmin);
 
 1843            gridY1    = p110y + gridDist, gridY2 = p010y + gridDist;
 
 1845            gridY2    = p100y + gridDist;
 
 1850      axis->
PaintAxis(p100x, p100y, p110x, p110y, bmin, bmax, ndivx, 
"");
 
 1851      axis->
PaintAxis(p100x, p100y, p000x, p000y, bmin, bmax, ndivx, 
"");
 
 1853         axis->
PaintAxis(p100x, p100y, p101x, p101y, bmin, bmax, ndivx, 
"");
 
 1855         axis->
PaintAxis(p110x, p110y, p111x, p111y, bmin, bmax, ndivx, 
"");
 
 1856      axis->
PaintAxis(p111x, p111y, p101x, p101y, bmin, bmax, ndivx, 
"");
 
 1857      axis->
PaintAxis(p101x, p101y, p001x, p001y, bmin, bmax, ndivx, 
"");
 
 1863                                  nbins, binWidth, 
" ");
 
 1864         for (i = 0; i < nbins + 1; i++) {
 
 1865            axisLevel = binLow+i*binWidth;
 
 1866            gridDist  = (axisLevel-bmin)*(p101y-p100y)/(bmax-bmin);
 
 1867            gridY1    = p100y + gridDist, gridY2 = p110y + gridDist;
 
 1869            gridY2    = p000y + gridDist;
 
 1888   if (
x2>=
x1) turnj = 1;
 
 1889   if (
x3>=
x2) turni = 1;
 
 1917            if (smer==0) q1 -= 1;
 
 1921            if (smer==0) q2 += 1;
 
 1958                  if ((q1!=q2||smer!=0) && flag==1) {
 
 2053                     xtaz = (dx1+dx2+dx4)/3;
 
 2054                     ytaz = (dy1+dy2+dy4)/3;
 
 2055                     ztaz = (z1+z2+z4)/3;
 
 2059                           if (sr1<0||sr1>w1||tr1<0||tr1>w2) 
Transform(sr1,tr1,-1);
 
 2064                           if (sr8<0||sr8>w1||tr8<0||tr8>w2) 
Transform(sr8,tr8,-1);
 
 2073                           if (sr3<0||sr3>w1||tr3<0||tr3>w2) 
Transform(sr3,tr3,-1);
 
 2078                           if (sr2<0||sr2>w1||tr2<0||tr2>w2) 
Transform(sr2,tr2,-1);
 
 2088                           if (sr5<0||sr5>w1||tr5<0||tr5>w2) 
Transform(sr5,tr5,-1);
 
 2093                           if (sr4<0||sr4>w1||tr4<0||tr4>w2) 
Transform(sr4,tr4,-1);
 
 2103                           if (sr7<0||sr7>w1||tr7<0||tr7>w2) 
Transform(sr7,tr7,-1);
 
 2108                           if (sr6<0||sr6>w1||tr6<0||tr6>w2) 
Transform(sr6,tr6,-1);
 
 2122                           if (sr1<0||sr1>w1||tr1<0||tr1>w2) 
Transform(sr1,tr1,-1);
 
 2127                           if (sr8<0||sr8>w1||tr8<0||tr8>w2) 
Transform(sr8,tr8,-1);
 
 2132                           da    = (dxr1+dx2+dx1)/3;
 
 2133                           db    = (dyr1+dy2+dy1)/3;
 
 2137                           da    = (dxr1+dxr2+dx1)/3;
 
 2138                           db    = (dyr1+dyr2+dy1)/3;
 
 2139                           dc    = (zr1+zr2+z1)/3;
 
 2142                           da    = (dxr2+dx1+dx4)/3;
 
 2143                           db    = (dyr2+dy1+dy4)/3;
 
 2148                           if (sr3<0||sr3>w1||tr3<0||tr3>w2) 
Transform(sr3,tr3,-1);
 
 2153                           if (sr2<0||sr2>w1||tr2<0||tr2>w2) 
Transform(sr2,tr2,-1);
 
 2158                           da    = (dx1+dx2+dx3)/3;
 
 2159                           db    = (dy1+dy2+dy3)/3;
 
 2163                           da    = (dx2+dxr1+dx3)/3;
 
 2164                           db    = (dy2+dyr1+dy3)/3;
 
 2168                           da    = (dx2+dxr2+dxr1)/3;
 
 2169                           db    = (dy2+dyr2+dyr1)/3;
 
 2170                           dc    = (z2+zr2+zr1)/3;
 
 2173                           da    = (dxr2+dx2+dx1)/3;
 
 2174                           db    = (dyr2+dy2+dy1)/3;
 
 2179                           if (sr5<0||sr5>w1||tr5<0||tr5>w2) 
Transform(sr5,tr5,-1);
 
 2184                           if (sr4<0||sr4>w1||tr4<0||tr4>w2) 
Transform(sr4,tr4,-1);
 
 2189                           da    = (dx2+dx3+dx4)/3;
 
 2190                           db    = (dy2+dy3+dy4)/3;
 
 2194                           da    = (dx4+dx3+dxr1)/3;
 
 2195                           db    = (dy4+dy3+dyr1)/3;
 
 2199                           da    = (dx3+dxr2+dxr1)/3;
 
 2200                           db    = (dy3+dyr2+dyr1)/3;
 
 2201                           dc    = (z3+zr2+zr1)/3;
 
 2204                           da    = (dx2+dxr2+dx3)/3;
 
 2205                           db    = (dy2+dyr2+dy3)/3;
 
 2210                           if (sr7<0||sr7>w1||tr7<0||tr7>w2) 
Transform(sr7,tr7,-1);
 
 2215                           if (sr6<0||sr6>w1||tr6<0||tr6>w2) 
Transform(sr6,tr6,-1);
 
 2220                           da    = (dx1+dx3+dx4)/3;
 
 2221                           db    = (dy1+dy3+dy4)/3;
 
 2225                           da    = (dx4+dx3+dxr2)/3;
 
 2226                           db    = (dy4+dy3+dyr2)/3;
 
 2230                           da    = (dx4+dxr2+dxr1)/3;
 
 2231                           db    = (dy4+dyr2+dyr1)/3;
 
 2232                           dc    = (z4+zr2+zr1)/3;
 
 2235                           da    = (dx1+dx4+dxr1)/3;
 
 2236                           db    = (dy1+dy4+dyr1)/3;
 
 2308                     xtaz = (dx3+dx2+dx4)/3;
 
 2309                     ytaz = (dy3+dy2+dy4)/3;
 
 2310                     ztaz = (z3+z2+z4)/3;
 
 2365                     if ((q1!=q2||smer!=0)&&flag==1) {
 
 2460                        xtaz = (dx1+dx2+dx4)/3;
 
 2461                        ytaz = (dy1+dy2+dy4)/3;
 
 2462                        ztaz = (z1+z2+z4)/3;
 
 2466                              if (sr1<0||sr1>w1||tr1<0||tr1>w2) 
Transform(sr1,tr1,-1);
 
 2471                              if (sr8<0||sr8>w1||tr8<0||tr8>w2) 
Transform(sr8,tr8,-1);
 
 2480                              if (sr3<0||sr3>w1||tr3<0||tr3>w2) 
Transform(sr3,tr3,-1);
 
 2485                              if (sr2<0||sr2>w1||tr2<0||tr2>w2) 
Transform(sr2,tr2,-1);
 
 2495                              if (sr5<0||sr5>w1||tr5<0||tr5>w2) 
Transform(sr5,tr5,-1);
 
 2500                              if (sr4<0||sr4>w1||tr4<0||tr4>w2) 
Transform(sr4,tr4,-1);
 
 2510                              if (sr7<0||sr7>w1||tr7<0||tr7>w2) 
Transform(sr7,tr7,-1);
 
 2515                              if (sr6<0||sr6>w1||tr6<0||tr6>w2) 
Transform(sr6,tr6,-1);
 
 2529                              if (sr1<0||sr1>w1||tr1<0||tr1>w2) 
Transform(sr1,tr1,-1);
 
 2534                              if (sr8<0||sr8>w1||tr8<0||tr8>w2) 
Transform(sr8,tr8,-1);
 
 2539                              da    = (dxr1+dx2+dx1)/3;
 
 2540                              db    = (dyr1+dy2+dy1)/3;
 
 2544                              da    = (dxr1+dxr2+dx1)/3;
 
 2545                              db    = (dyr1+dyr2+dy1)/3;
 
 2546                              dc    = (zr1+zr2+z1)/3;
 
 2549                              da    = (dxr2+dx1+dx4)/3;
 
 2550                              db    = (dyr2+dy1+dy4)/3;
 
 2555                              if (sr3<0||sr3>w1||tr3<0||tr3>w2) 
Transform(sr3,tr3,-1);
 
 2560                              if (sr2<0||sr2>w1||tr2<0||tr2>w2) 
Transform(sr2,tr2,-1);
 
 2565                              da    = (dx1+dx2+dx3)/3;
 
 2566                              db    = (dy1+dy2+dy3)/3;
 
 2570                              da    = (dx2+dxr1+dx3)/3;
 
 2571                              db    = (dy2+dyr1+dy3)/3;
 
 2575                              da    = (dx2+dxr2+dxr1)/3;
 
 2576                              db    = (dy2+dyr2+dyr1)/3;
 
 2577                              dc    = (z2+zr2+zr1)/3;
 
 2580                              da    = (dxr2+dx2+dx1)/3;
 
 2581                              db    = (dyr2+dy2+dy1)/3;
 
 2586                              if (sr5<0||sr5>w1||tr5<0||tr5>w2) 
Transform(sr5,tr5,-1);
 
 2591                              if (sr4<0||sr4>w1||tr4<0||tr4>w2) 
Transform(sr4,tr4,-1);
 
 2596                              da    = (dx2+dx3+dx4)/3;
 
 2597                              db    = (dy2+dy3+dy4)/3;
 
 2601                              da    = (dx4+dx3+dxr1)/3;
 
 2602                              db    = (dy4+dy3+dyr1)/3;
 
 2606                              da    = (dx3+dxr2+dxr1)/3;
 
 2607                              db    = (dy3+dyr2+dyr1)/3;
 
 2608                              dc    = (z3+zr2+zr1)/3;
 
 2611                              da    = (dx2+dxr2+dx3)/3;
 
 2612                              db    = (dy2+dyr2+dy3)/3;
 
 2617                              if (sr7<0||sr7>w1||tr7<0||tr7>w2) 
Transform(sr7,tr7,-1);
 
 2622                              if (sr6<0||sr6>w1||tr6<0||tr6>w2) 
Transform(sr6,tr6,-1);
 
 2627                              da    = (dx1+dx3+dx4)/3;
 
 2628                              db    = (dy1+dy3+dy4)/3;
 
 2632                              da    = (dx4+dx3+dxr2)/3;
 
 2633                              db    = (dy4+dy3+dyr2)/3;
 
 2637                              da    = (dx4+dxr2+dxr1)/3;
 
 2638                              db    = (dy4+dyr2+dyr1)/3;
 
 2639                              dc    = (z4+zr2+zr1)/3;
 
 2642                              da    = (dx1+dx4+dxr1)/3;
 
 2643                              db    = (dy1+dy4+dyr1)/3;
 
 2690                           da  = (dy2-dy1)*(z3-z1)-(dy3-dy1)*(z2-z1);
 
 2691                           db  = (z2-z1)*(dx3-dx1)-(z3-z1)*(dx2-dx1);
 
 2692                           dc  = (dx2-dx1)*(dy3-dy1)-(dx3-dx1)*(dy2-dy1);
 
 2693                           dd  = -da*dx1-db*dy1-dc*z1;
 
 2710                        if (pom2!=0) sdx1 = pom1/pom2;
 
 2713                        sdy1 = pom1-sdx1*pom2;
 
 2714                        for (sx4=sx1,sx5=sx1,sy5=sy1;sx4<=sx2;sx4++) {
 
 2716                           sdy4 = sdx1*pom1+sdy1;
 
 2717                           sy4  = (
Int_t)(sdy4);
 
 2725                                 if (dc!=0) 
v = (-dd-da*dx1-db*dy1)/dc;
 
 2726                                 else       v = (iv1+iv2+iv4)/3;
 
 2740                              if (dc!=0) 
v = (-dd-da*dx1-db*dy1)/dc;
 
 2741                              else       v = (iv1+iv2+iv4)/3;
 
 2765                        if (pom2!=0) sdx2 = pom1/pom2;
 
 2768                        sdy2  = pom1-sdx2*pom2;
 
 2779                        xtaz  = (dx3+dx2+dx4)/3;
 
 2780                        ytaz  = (dy3+dy2+dy4)/3;
 
 2781                        ztaz  = (z3+z2+z4)/3;
 
 2816                           da  = (dy2-dy1)*(z3-z1)-(dy3-dy1)*(z2-z1);
 
 2817                           db  = (z2-z1)*(dx3-dx1)-(z3-z1)*(dx2-dx1);
 
 2818                           dc  = (dx2-dx1)*(dy3-dy1)-(dx3-dx1)*(dy2-dy1);
 
 2819                           dd  = -da*dx1-db*dy1-dc*z1;
 
 2836                        if (pom2!=0) sdx1 = pom1/pom2;
 
 2839                        sdy1 = pom1-sdx1*pom2;
 
 2840                        for (sx4=sx1,sx5=sx1,sy5=sy1;sx4<=sx2;sx4++) {
 
 2842                           sdy4 = sdx1*pom1+sdy1;
 
 2851                                 if (dc!=0) 
v = (-dd-da*dx1-db*dy1)/dc;
 
 2852                                 else       v = (iv1+iv2+iv4)/3;
 
 2866                                 if (dc!=0) 
v = (-dd-da*dx1-db*dy1)/dc;
 
 2867                                 else       v = (iv1+iv2+iv4)/3;
 
 2877                        for (sx4=sx1p,sx5=sx1p,sy5=sy1p;sx4<=sx3p;sx4++) {
 
 2879                           sdy4 = sdx2p*pom1+sdy2p;
 
 2889                                 if (dcp!=0) 
v = (-ddp-dap*dx1-dbp*dy1)/dcp;
 
 2890                                 else        v = (iv1+iv2+iv4)/3;
 
 2905                                 if (dcp!=0) 
v = (-ddp-dap*dx1-dbp*dy1)/dcp;
 
 2906                                 else        v = (iv1+iv2+iv4)/3;
 
 2931                        if (pom2!=0) sdx2 = pom1/pom2;
 
 2934                        sdy2 = pom1-sdx2*pom2;
 
 2935                        for (sx4=sx2,sx5=sx2,sy5=sy2;sx4<=sx3;sx4++) {
 
 2937                           sdy4 = sdx2*pom1+sdy2;
 
 2946                                 if (dc!=0) 
v = (-dd-da*dx1-db*dy1)/dc;
 
 2947                                 else       v =(iv1+iv2+iv4)/3;
 
 2961                                 if (dc!=0) 
v = (-dd-da*dx1-db*dy1)/dc;
 
 2962                                 else       v =(iv1+iv2+iv4)/3;
 
 2975                  if (((flag==0)&&(smer==0))||((flag!=0)&&(smer!=0))) {
 
 2980                  } 
else if (((flag!=0)&&(smer==0))||((flag==0)&&(smer!=0))) {
 
 3008                  bezy1 = 
y1+(
y2-y3)/6;
 
 3009                  bezy2 = 
y2-(y4-
y1)/6;
 
 3035                     for (bezf=0;bezf<1.01;bezf+=0.1) {
 
 3045                           Envelope(ibezx2,ibezy2,ibezx1,ibezy1);
 
 3080                     for (bezf=0;bezf<1.01;bezf+=0.1) {
 
 3090                           Envelope(ibezx1,ibezy1,ibezx2,ibezy2);
 
 3104               if ((q1!=q2||smer!=0)&&flag==1) {
 
 3161                  i1 = (
Int_t)(zl/dcount_reg+1);
 
 3162                  if (z1!=z2||z2!=z3||z3!=z4) {
 
 3167                              if (
fZ>=1.0) 
fZ = log(
fZ);
 
 3182                        if (
fZ>zh) 
goto eqend;
 
 3186                        if ((z2<=
fZ&&
fZ<z1)||(z2<
fZ&&
fZ<=z1)) {
 
 3187                           xb = (
fZ-z2)*(dx1-dx2)/(z1-z2)+dx2;
 
 3190                        if ((z1<=
fZ&&
fZ<z2)||(z1<
fZ&&
fZ<=z2)) {
 
 3191                           xb = (
fZ-z1)*(dx2-dx1)/(z2-z1)+dx1;
 
 3194                        if (z2==
fZ&&
fZ==z1) {
 
 3203                        if ((z1<=
fZ&&
fZ<z4)||(z1<
fZ&&
fZ<=z4)) {
 
 3204                           ya = (
fZ-z1)*(dy4-dy1)/(z4-z1)+dy1;
 
 3207                        if ((z4<=
fZ&&
fZ<z1)||(z4<
fZ&&
fZ<=z1)) {
 
 3208                           ya = (
fZ-z4)*(dy1-dy4)/(z1-z4)+dy4;
 
 3211                        if (z4==
fZ&&
fZ==z1) {
 
 3223                        if ((z3<=
fZ&&
fZ<z4)||(z3<
fZ&&
fZ<=z4)) {
 
 3224                           xa = (
fZ-z3)*(dx4-dx3)/(z4-z3)+dx3;
 
 3227                        if ((z4<=
fZ&&
fZ<z3)||(z4<
fZ&&
fZ<=z3)) {
 
 3228                           xa = (
fZ-z4)*(dx3-dx4)/(z3-z4)+dx4;
 
 3231                        if (z4==
fZ&&
fZ==z3) {
 
 3243                        if ((z2<=
fZ&&
fZ<z3)||(z2<
fZ&&
fZ<=z3)) {
 
 3244                           ya = (
fZ-z2)*(dy3-dy2)/(z3-z2)+dy2;
 
 3247                        if ((z3<=
fZ&&
fZ<z2)||(z3<
fZ&&
fZ<=z2)) {
 
 3248                           ya = (
fZ-z3)*(dy2-dy3)/(z2-z3)+dy3;
 
 3251                        if (z3==
fZ&&
fZ==z2) {
 
 3270               if ((q1!=q2||smer!=0)&&flag==1) {
 
 3282                     if (
s1<=w1&&s2<=w1&&s3<=w1&&s4<=w1) {
 
 3296                     if (
s1<=w1&&s2<=w1&&s3<=w1&&s4<=w1) {
 
 3311                     if (
t1<=w2&&t2<=w2&&t3<=w2&&t4<=w2) {
 
 3325                     if (
t1<=w2&&t2<=w2&&t3<=w2&&t4<=w2) {
 
 3456                     if (pom2!=0) sdx1 = pom1/pom2;
 
 3459                     sdy1 = pom1-sdx1*pom2;
 
 3462                     if (pom2!=0) sdx2 = pom1/pom2;
 
 3465                     sdy2 = pom1-sdx2*pom2;
 
 3468                     if (pom2!=0) sdx3 = pom1/pom2;
 
 3471                     sdy3 = pom1-sdx3*pom2;
 
 3474                           for (sx4=sx1;sx4<=sx2;sx4++) {
 
 3476                              sdy4 = sdx1*pom1+sdy1;
 
 3479                                 sdy4 = sdx2*pom1+sdy2;
 
 3487                                 if ((sy4<=y5)||(sy5<y5)) {
 
 3496                           for (sx4=sx2;sx4<=sx3;sx4++) {
 
 3498                              sdy4 = sdx3*pom1+sdy3;
 
 3501                                 sdy4 = sdx2*pom1+sdy2;
 
 3509                                 if ((sy4<=y5)||(sy5<y5)) {
 
 3519                           for (sx4=sx1;sx4<=sx3;sx4++) {
 
 3521                              sdy4 = sdx2*pom1+sdy2;
 
 3524                                 sdy4 = sdx1*pom1+sdy1;
 
 3532                                 if ((sy4<=y5)||(sy5<y5)) {
 
 3541                           for (sx4=sx3;sx4<=sx2;sx4++) {
 
 3543                              sdy4 = sdx3*pom1+sdy3;
 
 3546                                 sdy4 = sdx1*pom1+sdy1;
 
 3554                                 if ((sy4<=y5)||(sy5<y5)) {
 
 3598                     if (pom2!=0) sdx1 = pom1/pom2;
 
 3601                     sdy1 = pom1-sdx1*pom2;
 
 3604                     if (pom2!=0) sdx2 = pom1/pom2;
 
 3607                     sdy2 = pom1-sdx2*pom2;
 
 3610                     if (pom2!=0) sdx3 = pom1/pom2;
 
 3613                     sdy3 = pom1-sdx3*pom2;
 
 3616                           for (sx4=sx1;sx4<=sx2;sx4++) {
 
 3618                              sdy4 = sdx1*pom1+sdy1;
 
 3621                                 sdy4 = sdx2*pom1+sdy2;
 
 3629                                 if ((sy4<=y5)||(sy5<y5)) {
 
 3638                           for (sx4=sx2;sx4<=sx3;sx4++) {
 
 3640                              sdy4 = sdx3*pom1+sdy3;
 
 3643                                 sdy4 = sdx2*pom1+sdy2;
 
 3651                                 if ((sy4<=y5)||(sy5<y5)) {
 
 3661                           for (sx4=sx1;sx4<=sx3;sx4++) {
 
 3663                              sdy4 = sdx2*pom1+sdy2;
 
 3666                                 sdy4 = sdx1*pom1+sdy1;
 
 3674                                 if ((sy4<=y5)||(sy5<y5)) {
 
 3683                           for (sx4=sx3;sx4<=sx2;sx4++) {
 
 3685                              sdy4 = sdx3*pom1+sdy3;
 
 3688                                 sdy4 = sdx1*pom1+sdy1;
 
 3696                                 if ((sy4<=y5)||(sy5<y5)) {
 
 3831                  if (((flag==0)&&(smer==0))||((flag!=0)&&(smer!=0))) {
 
 3868                        bezy1 = 
y1+(
y2-y3)/6;
 
 3869                        bezy2 = 
y2-(y4-
y1)/6;
 
 3895                           for (bezf=0;bezf<1.01;bezf+=0.1) {
 
 3905                                 Envelope(ibezx2,ibezy2,ibezx1,ibezy1);
 
 3940                           for (bezf=0;bezf<1.01;bezf+=0.1) {
 
 3950                                 Envelope(ibezx1,ibezy1,ibezx2,ibezy2);
 
 3964                  if ((q1!=q2||smer!=0)&&flag==1) {
 
 4059                     xtaz = (dx1+dx2+dx4)/3;
 
 4060                     ytaz = (dy1+dy2+dy4)/3;
 
 4061                     ztaz = (z1+z2+z4)/3;
 
 4065                           if (sr1<0||sr1>w1||tr1<0||tr1>w2) 
Transform(sr1,tr1,-1);
 
 4070                           if (sr8<0||sr8>w1||tr8<0||tr8>w2) 
Transform(sr8,tr8,-1);
 
 4079                           if (sr3<0||sr3>w1||tr3<0||tr3>w2) 
Transform(sr3,tr3,-1);
 
 4084                           if (sr2<0||sr2>w1||tr2<0||tr2>w2) 
Transform(sr2,tr2,-1);
 
 4094                           if (sr5<0||sr5>w1||tr5<0||tr5>w2) 
Transform(sr5,tr5,-1);
 
 4099                           if (sr4<0||sr4>w1||tr4<0||tr4>w2) 
Transform(sr4,tr4,-1);
 
 4109                           if (sr7<0||sr7>w1||tr7<0||tr7>w2) 
Transform(sr7,tr7,-1);
 
 4114                           if (sr6<0||sr6>w1||tr6<0||tr6>w2) 
Transform(sr6,tr6,-1);
 
 4128                           if (sr1<0||sr1>w1||tr1<0||tr1>w2) 
Transform(sr1,tr1,-1);
 
 4133                           if (sr8<0||sr8>w1||tr8<0||tr8>w2) 
Transform(sr8,tr8,-1);
 
 4138                           da    = (dxr1+dx2+dx1)/3;
 
 4139                           db    = (dyr1+dy2+dy1)/3;
 
 4143                           da    = (dxr1+dxr2+dx1)/3;
 
 4144                           db    = (dyr1+dyr2+dy1)/3;
 
 4145                           dc    = (zr1+zr2+z1)/3;
 
 4148                           da    = (dxr2+dx1+dx4)/3;
 
 4149                           db    = (dyr2+dy1+dy4)/3;
 
 4154                           if (sr3<0||sr3>w1||tr3<0||tr3>w2) 
Transform(sr3,tr3,-1);
 
 4159                           if (sr2<0||sr2>w1||tr2<0||tr2>w2) 
Transform(sr2,tr2,-1);
 
 4164                           da    = (dx1+dx2+dx3)/3;
 
 4165                           db    = (dy1+dy2+dy3)/3;
 
 4169                           da    = (dx2+dxr1+dx3)/3;
 
 4170                           db    = (dy2+dyr1+dy3)/3;
 
 4174                           da    = (dx2+dxr2+dxr1)/3;
 
 4175                           db    = (dy2+dyr2+dyr1)/3;
 
 4176                           dc    = (z2+zr2+zr1)/3;
 
 4179                           da    = (dxr2+dx2+dx1)/3;
 
 4180                           db    = (dyr2+dy2+dy1)/3;
 
 4185                           if (sr5<0||sr5>w1||tr5<0||tr5>w2) 
Transform(sr5,tr5,-1);
 
 4190                           if (sr4<0||sr4>w1||tr4<0||tr4>w2) 
Transform(sr4,tr4,-1);
 
 4195                           da    = (dx2+dx3+dx4)/3;
 
 4196                           db    = (dy2+dy3+dy4)/3;
 
 4200                           da    = (dx4+dx3+dxr1)/3;
 
 4201                           db    = (dy4+dy3+dyr1)/3;
 
 4205                           da    = (dx3+dxr2+dxr1)/3;
 
 4206                           db    = (dy3+dyr2+dyr1)/3;
 
 4207                           dc    = (z3+zr2+zr1)/3;
 
 4210                           da    = (dx2+dxr2+dx3)/3;
 
 4211                           db    = (dy2+dyr2+dy3)/3;
 
 4216                           if (sr7<0||sr7>w1||tr7<0||tr7>w2) 
Transform(sr7,tr7,-1);
 
 4221                           if (sr6<0||sr6>w1||tr6<0||tr6>w2) 
Transform(sr6,tr6,-1);
 
 4226                           da    = (dx1+dx3+dx4)/3;
 
 4227                           db    = (dy1+dy3+dy4)/3;
 
 4231                           da    = (dx4+dx3+dxr2)/3;
 
 4232                           db    = (dy4+dy3+dyr2)/3;
 
 4236                           da    = (dx4+dxr2+dxr1)/3;
 
 4237                           db    = (dy4+dyr2+dyr1)/3;
 
 4238                           dc    = (z4+zr2+zr1)/3;
 
 4241                           da    = (dx1+dx4+dxr1)/3;
 
 4242                           db    = (dy1+dy4+dyr1)/3;
 
 4289                        da  = (dy2-dy1)*(z3-z1)-(dy3-dy1)*(z2-z1);
 
 4290                        db  = (z2-z1)*(dx3-dx1)-(z3-z1)*(dx2-dx1);
 
 4291                        dc  = (dx2-dx1)*(dy3-dy1)-(dx3-dx1)*(dy2-dy1);
 
 4292                        dd  = -da*dx1-db*dy1-dc*z1;
 
 4308                     if (pom2!=0) sdx2 = pom1/pom2;
 
 4311                     sdy2  = pom1-sdx2*pom2;
 
 4322                     xtaz  = (dx3+dx2+dx4)/3;
 
 4323                     ytaz  = (dy3+dy2+dy4)/3;
 
 4324                     ztaz  = (z3+z2+z4)/3;
 
 4359                        da  = (dy2-dy1)*(z3-z1)-(dy3-dy1)*(z2-z1);
 
 4360                        db  = (z2-z1)*(dx3-dx1)-(z3-z1)*(dx2-dx1);
 
 4361                        dc  = (dx2-dx1)*(dy3-dy1)-(dx3-dx1)*(dy2-dy1);
 
 4362                        dd  = -da*dx1-db*dy1-dc*z1;
 
 4379                     if (pom2!=0) sdx1 = pom1/pom2;
 
 4382                     sdy1 = pom1-sdx1*pom2;
 
 4383                     for (sx4=sx1,sx5=sx1,sy5=sy1;sx4<=sx2;sx4++) {
 
 4385                        sdy4 = sdx1*pom1+sdy1;
 
 4394                              if (dc!=0) 
v = (-dd-da*dx1-db*dy1)/dc;
 
 4395                              else       v =(iv1+iv2+iv4)/3;
 
 4409                              if (dc!=0) 
v = (-dd-da*dx1-db*dy1)/dc;
 
 4410                              else       v =(iv1+iv2+iv4)/3;
 
 4420                     for (sx4=sx1p,sx5=sx1p,sy5=sy1p;sx4<=sx3p;sx4++) {
 
 4422                        sdy4 = sdx2p*pom1+sdy2p;
 
 4432                              if (dcp!=0) 
v = (-ddp-dap*dx1-dbp*dy1)/dcp;
 
 4433                              else        v = (iv1+iv2+iv4)/3;
 
 4448                              if (dcp!=0) 
v = (-ddp-dap*dx1-dbp*dy1)/dcp;
 
 4449                              else        v = (iv1+iv2+iv4)/3;
 
 4464                  if (((flag!=0)&&(smer==0))||((flag==0)&&(smer!=0))) {
 
 4501                        bezy1 = 
y1+(
y2-y3)/6;
 
 4502                        bezy2 = 
y2-(y4-
y1)/6;
 
 4528                           for (bezf=0;bezf<1.01;bezf+=0.1) {
 
 4538                                 Envelope(ibezx2,ibezy2,ibezx1,ibezy1);
 
 4573                           for (bezf=0;bezf<1.01;bezf+=0.1) {
 
 4583                              Envelope(ibezx1,ibezy1,ibezx2,ibezy2);
 
 4597                  if ((q1!=q2||smer!=0)&&flag==1) {
 
 4692                     xtaz = (dx1+dx2+dx4)/3;
 
 4693                     ytaz = (dy1+dy2+dy4)/3;
 
 4694                     ztaz = (z1+z2+z4)/3;
 
 4698                           if (sr1<0||sr1>w1||tr1<0||tr1>w2) 
Transform(sr1,tr1,-1);
 
 4703                           if (sr8<0||sr8>w1||tr8<0||tr8>w2) 
Transform(sr8,tr8,-1);
 
 4712                           if (sr3<0||sr3>w1||tr3<0||tr3>w2) 
Transform(sr3,tr3,-1);
 
 4717                           if (sr2<0||sr2>w1||tr2<0||tr2>w2) 
Transform(sr2,tr2,-1);
 
 4727                           if (sr5<0||sr5>w1||tr5<0||tr5>w2) 
Transform(sr5,tr5,-1);
 
 4732                           if (sr4<0||sr4>w1||tr4<0||tr4>w2) 
Transform(sr4,tr4,-1);
 
 4742                           if (sr7<0||sr7>w1||tr7<0||tr7>w2) 
Transform(sr7,tr7,-1);
 
 4747                           if (sr6<0||sr6>w1||tr6<0||tr6>w2) 
Transform(sr6,tr6,-1);
 
 4761                           if (sr1<0||sr1>w1||tr1<0||tr1>w2) 
Transform(sr1,tr1,-1);
 
 4766                           if (sr8<0||sr8>w1||tr8<0||tr8>w2) 
Transform(sr8,tr8,-1);
 
 4771                           da    = (dxr1+dx2+dx1)/3;
 
 4772                           db    = (dyr1+dy2+dy1)/3;
 
 4776                           da    = (dxr1+dxr2+dx1)/3;
 
 4777                           db    = (dyr1+dyr2+dy1)/3;
 
 4778                           dc    = (zr1+zr2+z1)/3;
 
 4781                           da    = (dxr2+dx1+dx4)/3;
 
 4782                           db    = (dyr2+dy1+dy4)/3;
 
 4787                           if (sr3<0||sr3>w1||tr3<0||tr3>w2) 
Transform(sr3,tr3,-1);
 
 4792                           if (sr2<0||sr2>w1||tr2<0||tr2>w2) 
Transform(sr2,tr2,-1);
 
 4797                           da    = (dx1+dx2+dx3)/3;
 
 4798                           db    = (dy1+dy2+dy3)/3;
 
 4802                           da    = (dx2+dxr1+dx3)/3;
 
 4803                           db    = (dy2+dyr1+dy3)/3;
 
 4807                           da    = (dx2+dxr2+dxr1)/3;
 
 4808                           db    = (dy2+dyr2+dyr1)/3;
 
 4809                           dc    = (z2+zr2+zr1)/3;
 
 4812                           da    = (dxr2+dx2+dx1)/3;
 
 4813                           db    = (dyr2+dy2+dy1)/3;
 
 4818                           if (sr5<0||sr5>w1||tr5<0||tr5>w2) 
Transform(sr5,tr5,-1);
 
 4823                           if (sr4<0||sr4>w1||tr4<0||tr4>w2) 
Transform(sr4,tr4,-1);
 
 4828                           da    = (dx2+dx3+dx4)/3;
 
 4829                           db    = (dy2+dy3+dy4)/3;
 
 4833                           da    = (dx4+dx3+dxr1)/3;
 
 4834                           db    = (dy4+dy3+dyr1)/3;
 
 4838                           da    = (dx3+dxr2+dxr1)/3;
 
 4839                           db    = (dy3+dyr2+dyr1)/3;
 
 4840                           dc    = (z3+zr2+zr1)/3;
 
 4843                           da    = (dx2+dxr2+dx3)/3;
 
 4844                           db    = (dy2+dyr2+dy3)/3;
 
 4849                           if (sr7<0||sr7>w1||tr7<0||tr7>w2) 
Transform(sr7,tr7,-1);
 
 4854                           if (sr6<0||sr6>w1||tr6<0||tr6>w2) 
Transform(sr6,tr6,-1);
 
 4859                           da    = (dx1+dx3+dx4)/3;
 
 4860                           db    = (dy1+dy3+dy4)/3;
 
 4864                           da    = (dx4+dx3+dxr2)/3;
 
 4865                           db    = (dy4+dy3+dyr2)/3;
 
 4869                           da    = (dx4+dxr2+dxr1)/3;
 
 4870                           db    = (dy4+dyr2+dyr1)/3;
 
 4871                           dc    = (z4+zr2+zr1)/3;
 
 4874                           da    = (dx1+dx4+dxr1)/3;
 
 4875                           db    = (dy1+dy4+dyr1)/3;
 
 4922                        da  = (dy2-dy1)*(z3-z1)-(dy3-dy1)*(z2-z1);
 
 4923                        db  = (z2-z1)*(dx3-dx1)-(z3-z1)*(dx2-dx1);
 
 4924                        dc  = (dx2-dx1)*(dy3-dy1)-(dx3-dx1)*(dy2-dy1);
 
 4925                        dd  = -da*dx1-db*dy1-dc*z1;
 
 4942                     if (pom2!=0) sdx1 = pom1/pom2;
 
 4945                     sdy1 = pom1-sdx1*pom2;
 
 4946                     for (sx4=sx1,sx5=sx1,sy5=sy1;sx4<=sx2;sx4++) {
 
 4948                        sdy4 = sdx1*pom1+sdy1;
 
 4957                              if (dc!=0) 
v = (-dd-da*dx1-db*dy1)/dc;
 
 4958                              else       v =(iv1+iv2+iv4)/3;
 
 4972                              if (dc!=0) 
v = (-dd-da*dx1-db*dy1)/dc;
 
 4973                              else       v =(iv1+iv2+iv4)/3;
 
 4983                     xtaz = (dx3+dx2+dx4)/3;
 
 4984                     ytaz = (dy3+dy2+dy4)/3;
 
 4985                     ztaz = (z3+z2+z4)/3;
 
 5020                        da  = (dy2-dy1)*(z3-z1)-(dy3-dy1)*(z2-z1);
 
 5021                        db  = (z2-z1)*(dx3-dx1)-(z3-z1)*(dx2-dx1);
 
 5022                        dc  = (dx2-dx1)*(dy3-dy1)-(dx3-dx1)*(dy2-dy1);
 
 5023                        dd  = -da*dx1-db*dy1-dc*z1;
 
 5040                     if (pom2!=0) sdx2 = pom1/pom2;
 
 5043                     sdy2 = pom1-sdx2*pom2;
 
 5044                     for (sx4=sx2,sx5=sx2,sy5=sy2;sx4<=sx3;sx4++) {
 
 5046                        sdy4 = sdx2*pom1+sdy2;
 
 5055                              if (dc!=0) 
v = (-dd-da*dx1-db*dy1)/dc;
 
 5056                              else       v =(iv1+iv2+iv4)/3;
 
 5070                              if (dc!=0) 
v = (-dd-da*dx1-db*dy1)/dc;
 
 5071                              else       v =(iv1+iv2+iv4)/3;
 
 5100               box->SetFillStyle(1001);
 
 5101               if ((q1!=q2||smer!=0)&&flag==1) {
 
 5196                  xtaz = (dx1+dx2+dx4)/3;
 
 5197                  ytaz = (dy1+dy2+dy4)/3;
 
 5198                  ztaz = (z1+z2+z4)/3;
 
 5202                        if (sr1<0||sr1>w1||tr1<0||tr1>w2) 
Transform(sr1,tr1,-1);
 
 5207                        if (sr8<0||sr8>w1||tr8<0||tr8>w2) 
Transform(sr8,tr8,-1);
 
 5216                        if (sr3<0||sr3>w1||tr3<0||tr3>w2) 
Transform(sr3,tr3,-1);
 
 5221                        if (sr2<0||sr2>w1||tr2<0||tr2>w2) 
Transform(sr2,tr2,-1);
 
 5231                        if (sr5<0||sr5>w1||tr5<0||tr5>w2) 
Transform(sr5,tr5,-1);
 
 5236                        if (sr4<0||sr4>w1||tr4<0||tr4>w2) 
Transform(sr4,tr4,-1);
 
 5246                        if (sr7<0||sr7>w1||tr7<0||tr7>w2) 
Transform(sr7,tr7,-1);
 
 5251                        if (sr6<0||sr6>w1||tr6<0||tr6>w2) 
Transform(sr6,tr6,-1);
 
 5265                        if (sr1<0||sr1>w1||tr1<0||tr1>w2) 
Transform(sr1,tr1,-1);
 
 5270                        if (sr8<0||sr8>w1||tr8<0||tr8>w2) 
Transform(sr8,tr8,-1);
 
 5275                        da    = (dxr1+dx2+dx1)/3;
 
 5276                        db    = (dyr1+dy2+dy1)/3;
 
 5280                        da    = (dxr1+dxr2+dx1)/3;
 
 5281                        db    = (dyr1+dyr2+dy1)/3;
 
 5282                        dc    = (zr1+zr2+z1)/3;
 
 5285                        da    = (dxr2+dx1+dx4)/3;
 
 5286                        db    = (dyr2+dy1+dy4)/3;
 
 5291                        if (sr3<0||sr3>w1||tr3<0||tr3>w2) 
Transform(sr3,tr3,-1);
 
 5296                        if (sr2<0||sr2>w1||tr2<0||tr2>w2) 
Transform(sr2,tr2,-1);
 
 5301                        da    = (dx1+dx2+dx3)/3;
 
 5302                        db    = (dy1+dy2+dy3)/3;
 
 5306                        da    = (dx2+dxr1+dx3)/3;
 
 5307                        db    = (dy2+dyr1+dy3)/3;
 
 5311                        da    = (dx2+dxr2+dxr1)/3;
 
 5312                        db    = (dy2+dyr2+dyr1)/3;
 
 5313                        dc    = (z2+zr2+zr1)/3;
 
 5316                        da    = (dxr2+dx2+dx1)/3;
 
 5317                        db    = (dyr2+dy2+dy1)/3;
 
 5322                        if (sr5<0||sr5>w1||tr5<0||tr5>w2) 
Transform(sr5,tr5,-1);
 
 5327                        if (sr4<0||sr4>w1||tr4<0||tr4>w2) 
Transform(sr4,tr4,-1);
 
 5332                        da    = (dx2+dx3+dx4)/3;
 
 5333                        db    = (dy2+dy3+dy4)/3;
 
 5337                        da    = (dx4+dx3+dxr1)/3;
 
 5338                        db    = (dy4+dy3+dyr1)/3;
 
 5342                        da    = (dx3+dxr2+dxr1)/3;
 
 5343                        db    = (dy3+dyr2+dyr1)/3;
 
 5344                        dc    = (z3+zr2+zr1)/3;
 
 5347                        da    = (dx2+dxr2+dx3)/3;
 
 5348                        db    = (dy2+dyr2+dy3)/3;
 
 5353                        if (sr7<0||sr7>w1||tr7<0||tr7>w2) 
Transform(sr7,tr7,-1);
 
 5358                        if (sr6<0||sr6>w1||tr6<0||tr6>w2) 
Transform(sr6,tr6,-1);
 
 5363                        da    = (dx1+dx3+dx4)/3;
 
 5364                        db    = (dy1+dy3+dy4)/3;
 
 5368                        da    = (dx4+dx3+dxr2)/3;
 
 5369                        db    = (dy4+dy3+dyr2)/3;
 
 5373                        da    = (dx4+dxr2+dxr1)/3;
 
 5374                        db    = (dy4+dyr2+dyr1)/3;
 
 5375                        dc    = (z4+zr2+zr1)/3;
 
 5378                        da    = (dx1+dx4+dxr1)/3;
 
 5379                        db    = (dy1+dy4+dyr1)/3;
 
 5426                     da  = (dy2-dy1)*(z3-z1)-(dy3-dy1)*(z2-z1);
 
 5427                     db  = (z2-z1)*(dx3-dx1)-(z3-z1)*(dx2-dx1);
 
 5428                     dc  = (dx2-dx1)*(dy3-dy1)-(dx3-dx1)*(dy2-dy1);
 
 5429                     dd  = -da*dx1-db*dy1-dc*z1;
 
 5466                  if (pom2!=0) sdx1 = pom1/pom2;
 
 5469                  sdy1 = pom1-sdx1*pom2;
 
 5472                  if (pom2!=0) sdx2 = pom1/pom2;
 
 5475                  sdy2 = pom1-sdx2*pom2;
 
 5478                  if (pom2!=0) sdx3 = pom1/pom2;
 
 5481                  sdy3 = pom1-sdx3*pom2;
 
 5484                        for (sx4=sx1;sx4<=sx2;sx4++) {
 
 5486                           sdy4 = sdx1*pom1+sdy1;
 
 5489                              sdy4 = sdx2*pom1+sdy2;
 
 5497                              if ((sy4<=y5)||(sy5<y5)) {
 
 5501                                    box->PaintBox(
gPad->PixeltoX(sx4),
gPad->PixeltoY(sy4)+1,
gPad->PixeltoX(sx4+1),
gPad->PixeltoY(sy5-1)+1);
 
 5503                                    for (il=sy5;il<=sy4+1;il++) {
 
 5505                                       if(il<=sy4) dy1 = il;
 
 5507                                       if (dc!=0) 
v = (-dd-da*dx1-db*dy1)/dc;
 
 5508                                       else       v =(iv1+iv2+iv4)/3;
 
 5512                                       box->PaintBox(
gPad->PixeltoX(sx4),
gPad->PixeltoY(il)+1,
gPad->PixeltoX(sx4+1),
gPad->PixeltoY(il-1)+1);
 
 5520                        for (sx4=sx2;sx4<=sx3;sx4++) {
 
 5522                           sdy4 = sdx3*pom1+sdy3;
 
 5525                              sdy4 = sdx2*pom1+sdy2;
 
 5533                              if ((sy4<=y5)||(sy5<y5)) {
 
 5537                                    box->PaintBox(
gPad->PixeltoX(sx4),
gPad->PixeltoY(sy4)+1,
gPad->PixeltoX(sx4+1),
gPad->PixeltoY(sy5-1)+1);
 
 5539                                    for (il=sy5;il<=sy4+1;il++) {
 
 5541                                       if(il<=sy4) dy1 = il;
 
 5543                                       if (dc!=0) 
v = (-dd-da*dx1-db*dy1)/dc;
 
 5544                                       else       v =(iv1+iv2+iv4)/3;
 
 5548                                       box->PaintBox(
gPad->PixeltoX(sx4),
gPad->PixeltoY(il)+1,
gPad->PixeltoX(sx4+1),
gPad->PixeltoY(il-1)+1);
 
 5557                        for (sx4=sx1;sx4<=sx3;sx4++) {
 
 5559                           sdy4 = sdx2*pom1+sdy2;
 
 5562                              sdy4 = sdx1*pom1+sdy1;
 
 5570                              if ((sy4<=y5)||(sy5<y5)) {
 
 5574                                    box->PaintBox(
gPad->PixeltoX(sx4),
gPad->PixeltoY(sy4)+1,
gPad->PixeltoX(sx4+1),
gPad->PixeltoY(sy5-1)+1);
 
 5576                                    for (il=sy5;il<=sy4+1;il++) {
 
 5578                                       if(il<=sy4) dy1 = il;
 
 5580                                       if (dc!=0) 
v = (-dd-da*dx1-db*dy1)/dc;
 
 5581                                       else       v =(iv1+iv2+iv4)/3;
 
 5585                                       box->PaintBox(
gPad->PixeltoX(sx4),
gPad->PixeltoY(il)+1,
gPad->PixeltoX(sx4+1),
gPad->PixeltoY(il-1)+1);
 
 5593                        for (sx4=sx3;sx4<=sx2;sx4++) {
 
 5595                           sdy4 = sdx3*pom1+sdy3;
 
 5598                              sdy4 = sdx1*pom1+sdy1;
 
 5606                              if ((sy4<=y5)||(sy5<y5)) {
 
 5610                                    box->PaintBox(
gPad->PixeltoX(sx4),
gPad->PixeltoY(sy4)+1,
gPad->PixeltoX(sx4+1),
gPad->PixeltoY(sy5-1)+1);
 
 5612                                    for (il=sy5;il<=sy4+1;il++) {
 
 5614                                       if(il<=sy4) dy1 = il;
 
 5616                                       if (dc!=0) 
v = (-dd-da*dx1-db*dy1)/dc;
 
 5617                                       else       v =(iv1+iv2+iv4)/3;
 
 5621                                       box->PaintBox(
gPad->PixeltoX(sx4),
gPad->PixeltoY(il)+1,
gPad->PixeltoX(sx4+1),
gPad->PixeltoY(il-1)+1);
 
 5629                  xtaz = (dx3+dx2+dx4)/3;
 
 5630                  ytaz = (dy3+dy2+dy4)/3;
 
 5631                  ztaz = (z3+z2+z4)/3;
 
 5666                     da  = (dy2-dy1)*(z3-z1)-(dy3-dy1)*(z2-z1);
 
 5667                     db  = (z2-z1)*(dx3-dx1)-(z3-z1)*(dx2-dx1);
 
 5668                     dc  = (dx2-dx1)*(dy3-dy1)-(dx3-dx1)*(dy2-dy1);
 
 5669                     dd  = -da*dx1-db*dy1-dc*z1;
 
 5706                  if (pom2!=0) sdx1 = pom1/pom2;
 
 5709                  sdy1 = pom1-sdx1*pom2;
 
 5712                  if (pom2!=0) sdx2 = pom1/pom2;
 
 5715                  sdy2 = pom1-sdx2*pom2;
 
 5718                  if (pom2!=0) sdx3 = pom1/pom2;
 
 5721                  sdy3 = pom1-sdx3*pom2;
 
 5724                        for (sx4=sx1;sx4<=sx2;sx4++) {
 
 5726                           sdy4 = sdx1*pom1+sdy1;
 
 5729                              sdy4 = sdx2*pom1+sdy2;
 
 5737                              if ((sy4<=y5)||(sy5<y5)) {
 
 5741                                    box->PaintBox(
gPad->PixeltoX(sx4),
gPad->PixeltoY(sy4)+1,
gPad->PixeltoX(sx4+1),
gPad->PixeltoY(sy5-1)+1);
 
 5743                                    for (il=sy5;il<=sy4+1;il++) {
 
 5745                                       if(il<=sy4) dy1 = il;
 
 5747                                       if (dc!=0) 
v = (-dd-da*dx1-db*dy1)/dc;
 
 5748                                       else       v =(iv2+iv3+iv4)/3;
 
 5752                                       box->PaintBox(
gPad->PixeltoX(sx4),
gPad->PixeltoY(il)+1,
gPad->PixeltoX(sx4+1),
gPad->PixeltoY(il-1)+1);
 
 5760                        for (sx4=sx2;sx4<=sx3;sx4++) {
 
 5762                           sdy4 = sdx3*pom1+sdy3;
 
 5765                              sdy4 = sdx2*pom1+sdy2;
 
 5773                              if ((sy4<=y5)||(sy5<y5)) {
 
 5777                                    box->PaintBox(
gPad->PixeltoX(sx4),
gPad->PixeltoY(sy4)+1,
gPad->PixeltoX(sx4+1),
gPad->PixeltoY(sy5-1)+1);
 
 5779                                    for (il=sy5;il<=sy4+1;il++) {
 
 5781                                       if(il<=sy4) dy1 = il;
 
 5783                                       if (dc!=0) 
v = (-dd-da*dx1-db*dy1)/dc;
 
 5784                                       else       v =(iv2+iv3+iv4)/3;
 
 5788                                       box->PaintBox(
gPad->PixeltoX(sx4),
gPad->PixeltoY(il)+1,
gPad->PixeltoX(sx4+1),
gPad->PixeltoY(il-1)+1);
 
 5797                        for (sx4=sx1;sx4<=sx3;sx4++) {
 
 5799                           sdy4 = sdx2*pom1+sdy2;
 
 5802                              sdy4 = sdx1*pom1+sdy1;
 
 5810                              if ((sy4<=y5)||(sy5<y5)) {
 
 5814                                    box->PaintBox(
gPad->PixeltoX(sx4),
gPad->PixeltoY(sy4)+1,
gPad->PixeltoX(sx4+1),
gPad->PixeltoY(sy5-1)+1);
 
 5816                                    for (il=sy5;il<=sy4+1;il++) {
 
 5818                                       if(il<=sy4) dy1 = il;
 
 5820                                       if (dc!=0) 
v = (-dd-da*dx1-db*dy1)/dc;
 
 5821                                       else       v =(iv2+iv3+iv4)/3;
 
 5825                                       box->PaintBox(
gPad->PixeltoX(sx4),
gPad->PixeltoY(il)+1,
gPad->PixeltoX(sx4+1),
gPad->PixeltoY(il-1)+1);
 
 5833                        for (sx4=sx3;sx4<=sx2;sx4++) {
 
 5835                           sdy4 = sdx3*pom1+sdy3;
 
 5838                              sdy4 = sdx1*pom1+sdy1;
 
 5846                              if ((sy4<=y5)||(sy5<y5)) {
 
 5850                                    box->PaintBox(
gPad->PixeltoX(sx4),
gPad->PixeltoY(sy4)+1,
gPad->PixeltoX(sx4+1),
gPad->PixeltoY(sy5-1)+1);
 
 5852                                    for (il=sy5;il<=sy4+1;il++) {
 
 5854                                       if(il<=sy4) dy1 = il;
 
 5856                                       if (dc!=0) 
v = (-dd-da*dx1-db*dy1)/dc;
 
 5857                                       else       v =(iv2+iv3+iv4)/3;
 
 5861                                       box->PaintBox(
gPad->PixeltoX(sx4),
gPad->PixeltoY(il)+1,
gPad->PixeltoX(sx4+1),
gPad->PixeltoY(il-1)+1);
 
 5873                  if ((q1!=q2||smer!=0)&&flag==1) {
 
 5917                  if ((q1!=q2||smer!=0)&&flag==1) {
 
 5960                  if ((q1!=q2||smer!=0)&&flag==1) {
 
 6055                     xtaz = (dx1+dx2+dx4)/3;
 
 6056                     ytaz = (dy1+dy2+dy4)/3;
 
 6057                     ztaz = (z1+z2+z4)/3;
 
 6061                           if (sr1<0||sr1>w1||tr1<0||tr1>w2) 
Transform(sr1,tr1,-1);
 
 6066                           if (sr8<0||sr8>w1||tr8<0||tr8>w2) 
Transform(sr8,tr8,-1);
 
 6075                           if (sr3<0||sr3>w1||tr3<0||tr3>w2) 
Transform(sr3,tr3,-1);
 
 6080                           if (sr2<0||sr2>w1||tr2<0||tr2>w2) 
Transform(sr2,tr2,-1);
 
 6090                           if (sr5<0||sr5>w1||tr5<0||tr5>w2) 
Transform(sr5,tr5,-1);
 
 6095                           if (sr4<0||sr4>w1||tr4<0||tr4>w2) 
Transform(sr4,tr4,-1);
 
 6105                           if (sr7<0||sr7>w1||tr7<0||tr7>w2) 
Transform(sr7,tr7,-1);
 
 6110                           if (sr6<0||sr6>w1||tr6<0||tr6>w2) 
Transform(sr6,tr6,-1);
 
 6124                           if (sr1<0||sr1>w1||tr1<0||tr1>w2) 
Transform(sr1,tr1,-1);
 
 6129                           if (sr8<0||sr8>w1||tr8<0||tr8>w2) 
Transform(sr8,tr8,-1);
 
 6134                           da    = (dxr1+dx2+dx1)/3;
 
 6135                           db    = (dyr1+dy2+dy1)/3;
 
 6139                           da    = (dxr1+dxr2+dx1)/3;
 
 6140                           db    = (dyr1+dyr2+dy1)/3;
 
 6141                           dc    = (zr1+zr2+z1)/3;
 
 6144                           da    = (dxr2+dx1+dx4)/3;
 
 6145                           db    = (dyr2+dy1+dy4)/3;
 
 6150                           if (sr3<0||sr3>w1||tr3<0||tr3>w2) 
Transform(sr3,tr3,-1);
 
 6155                           if (sr2<0||sr2>w1||tr2<0||tr2>w2) 
Transform(sr2,tr2,-1);
 
 6160                           da    = (dx1+dx2+dx3)/3;
 
 6161                           db    = (dy1+dy2+dy3)/3;
 
 6165                           da    = (dx2+dxr1+dx3)/3;
 
 6166                           db    = (dy2+dyr1+dy3)/3;
 
 6170                           da    = (dx2+dxr2+dxr1)/3;
 
 6171                           db    = (dy2+dyr2+dyr1)/3;
 
 6172                           dc    = (z2+zr2+zr1)/3;
 
 6175                           da    = (dxr2+dx2+dx1)/3;
 
 6176                           db    = (dyr2+dy2+dy1)/3;
 
 6181                           if (sr5<0||sr5>w1||tr5<0||tr5>w2) 
Transform(sr5,tr5,-1);
 
 6186                           if (sr4<0||sr4>w1||tr4<0||tr4>w2) 
Transform(sr4,tr4,-1);
 
 6191                           da    = (dx2+dx3+dx4)/3;
 
 6192                           db    = (dy2+dy3+dy4)/3;
 
 6196                           da    = (dx4+dx3+dxr1)/3;
 
 6197                           db    = (dy4+dy3+dyr1)/3;
 
 6201                           da    = (dx3+dxr2+dxr1)/3;
 
 6202                           db    = (dy3+dyr2+dyr1)/3;
 
 6203                           dc    = (z3+zr2+zr1)/3;
 
 6206                           da    = (dx2+dxr2+dx3)/3;
 
 6207                           db    = (dy2+dyr2+dy3)/3;
 
 6212                           if (sr7<0||sr7>w1||tr7<0||tr7>w2) 
Transform(sr7,tr7,-1);
 
 6217                           if (sr6<0||sr6>w1||tr6<0||tr6>w2) 
Transform(sr6,tr6,-1);
 
 6222                           da    = (dx1+dx3+dx4)/3;
 
 6223                           db    = (dy1+dy3+dy4)/3;
 
 6227                           da    = (dx4+dx3+dxr2)/3;
 
 6228                           db    = (dy4+dy3+dyr2)/3;
 
 6232                           da    = (dx4+dxr2+dxr1)/3;
 
 6233                           db    = (dy4+dyr2+dyr1)/3;
 
 6234                           dc    = (z4+zr2+zr1)/3;
 
 6237                           da    = (dx1+dx4+dxr1)/3;
 
 6238                           db    = (dy1+dy4+dyr1)/3;
 
 6285                        da  = (dy2-dy1)*(z3-z1)-(dy3-dy1)*(z2-z1);
 
 6286                        db  = (z2-z1)*(dx3-dx1)-(z3-z1)*(dx2-dx1);
 
 6287                        dc  = (dx2-dx1)*(dy3-dy1)-(dx3-dx1)*(dy2-dy1);
 
 6288                        dd  = -da*dx1-db*dy1-dc*z1;
 
 6305                     if (pom2!=0) sdx1 = pom1/pom2;
 
 6308                     sdy1 = pom1-sdx1*pom2;
 
 6309                     for (sx4=sx1,sx5=sx1,sy5=sy1;sx4<=sx2;sx4++) {
 
 6311                        sdy4 = sdx1*pom1+sdy1;
 
 6320                              if (dc!=0) 
v = (-dd-da*dx1-db*dy1)/dc;
 
 6321                              else v = (iv1+iv2+iv4)/3;
 
 6335                              if (dc!=0) 
v = (-dd-da*dx1-db*dy1)/dc;
 
 6336                              else v = (iv1+iv2+iv4)/3;
 
 6360                     if (pom2!=0) sdx2 = pom1/pom2;
 
 6363                     sdy2  = pom1-sdx2*pom2;
 
 6374                     xtaz  = (dx3+dx2+dx4)/3;
 
 6375                     ytaz  = (dy3+dy2+dy4)/3;
 
 6376                     ztaz  = (z3+z2+z4)/3;
 
 6411                        da = (dy2-dy1)*(z3-z1)-(dy3-dy1)*(z2-z1);
 
 6412                        db = (z2-z1)*(dx3-dx1)-(z3-z1)*(dx2-dx1);
 
 6413                        dc = (dx2-dx1)*(dy3-dy1)-(dx3-dx1)*(dy2-dy1);
 
 6414                        dd = -da*dx1-db*dy1-dc*z1;
 
 6431                     if (pom2!=0) sdx1 = pom1/pom2;
 
 6434                     sdy1 = pom1-sdx1*pom2;
 
 6435                     for (sx4=sx1,sx5=sx1,sy5=sy1;sx4<=sx2;sx4++) {
 
 6437                        sdy4 = sdx1*pom1+sdy1;
 
 6446                              if (dc!=0) 
v = (-dd-da*dx1-db*dy1)/dc;
 
 6447                              else v = (iv1+iv2+iv4)/3;
 
 6461                              if (dc!=0) 
v = (-dd-da*dx1-db*dy1)/dc;
 
 6462                              else v = (iv1+iv2+iv4)/3;
 
 6487                     if (pom2!=0) sdx1 = pom1/pom2;
 
 6490                     sdy1 = pom1-sdx1*pom2;
 
 6491                     for (sx4=sx1,sx5=sx1,sy5=sy1;sx4<=sx2;sx4++) {
 
 6493                        sdy4 = sdx1*pom1+sdy1;
 
 6502                           if (dc!=0) 
v = (-dd-da*dx1-db*dy1)/dc;
 
 6503                           else v = (iv1+iv2+iv4)/3;
 
 6517                              if (dc!=0) 
v = (-dd-da*dx1-db*dy1)/dc;
 
 6518                              else v = (iv1+iv2+iv4)/3;
 
 6528                     for (sx4=sx1p,sx5=sx1p,sy5=sy1p;sx4<=sx3p;sx4++) {
 
 6530                        sdy4 = sdx2p*pom1+sdy2p;
 
 6540                              if (dcp!=0) 
v = (-ddp-dap*dx1-dbp*dy1)/dcp;
 
 6541                              else v = (iv1+iv2+iv4)/3;
 
 6556                              if (dcp!=0) 
v = (-ddp-dap*dx1-dbp*dy1)/dcp;
 
 6557                              else v = (iv1+iv2+iv4)/3;
 
 6582                     if (pom2!=0) sdx2 = pom1/pom2;
 
 6585                     sdy2 = pom1-sdx2*pom2;
 
 6586                     for (sx4=sx2,sx5=sx2,sy5=sy2;sx4<=sx3;sx4++) {
 
 6588                        sdy4 = sdx2*pom1+sdy2;
 
 6597                              if (dc!=0) 
v = (-dd-da*dx1-db*dy1)/dc;
 
 6598                              else v = (iv1+iv2+iv4)/3;
 
 6612                              if (dc!=0) 
v = (-dd-da*dx1-db*dy1)/dc;
 
 6613                              else v = (iv1+iv2+iv4)/3;
 
 6640            if (smer==0) q1 += 1;
 
 6648      } 
while ((q1!=qv||(q2!=(qv-1) && q2!=w2)||smer!=0||flag!=1) &&
 
 6649               ((q1!=(qv-1) && q1!=w1)||q2!=qv||smer!=1||flag!=1) &&
 
 6651      if (qv<=w2&&qv<=w1) {
 
 6694         if (q2<=w2) 
goto l2;
 
 6696   } 
while (q1<=w1&&q2<=w2);
 
 6709      if (
x2>=
x1) turnj = 1;
 
 6710      if (
x3>=
x2) turni = 1;
 
 6738               if (smer==0) q1 -= 1;
 
 6742               if (smer==0) q2 += 1;
 
 6795               if (smer==0) q1 += 1;
 
 6803         } 
while ((q1!=qv||(q2!=(qv-1)&&q2!=w2)||smer!=0||flag!=1) &&
 
 6804                  ((q1!=(qv-1)&&q1!=w1)||q2!=qv||smer!=1||flag!=1) &&
 
 6806         if (qv<=w2&&qv<=w1) {
 
 6849            if (q2<=w2) 
goto lc2;
 
 6851      } 
while (q1<=w1&&q2<=w2);
 
 6855   static char chopt[10] = 
"";
 
 6857      axis->
PaintAxis(p101x, p101y, p111x, p111y, bmin, bmax, ndivx, 
"");
 
 6858      axis->
PaintAxis(p011x, p011y, p111x, p111y, bmin, bmax, ndivx, 
"");
 
 6860         axis->
PaintAxis(p110x, p110y, p111x, p111y, bmin, bmax, ndivx, 
"");
 
 6865      chopt[0] = 0; strlcat(chopt, 
"SDH-",10);
 
 6867         strlcat(chopt, 
"N",10);
 
 6870      xaxis->
PaintAxis(p010x, p010y, p110x, p110y, bmin, bmax, ndivx, chopt);
 
 6875      chopt[0] = 0; strlcat(chopt, 
"SDH+",10);
 
 6877         strlcat(chopt, 
"N",10);
 
 6880      yaxis->
PaintAxis(p100x, p100y, p110x, p110y, bmin, bmax, ndivy, chopt);
 
 6888            if (bmin <= 0) bmin=0.001*bmax;
 
 6889            zaxis->
PaintAxis(p010x, p010y, p011x, p011y, bmin, bmax, ndivz, 
"G+");
 
 6891            TF1 *
f1=
new TF1(
"f1",
"sqrt(x)",bmin,bmax);
 
 6892            TGaxis *a1 = 
new TGaxis(p010x, p010y, p011x, p011y, 
"f1", ndivz, 
"SDH+");
 
 6898            chopt[0] = 0; strlcat(chopt, 
"SDH+",10);
 
 6900               strlcat(chopt, 
"N",10);
 
 6903            zaxis->
PaintAxis(p010x, p010y, p011x, p011y, bmin, bmax, ndivz, chopt);
 
 6907      axis->
PaintAxis(p001x, p001y, p101x, p101y, bmin, bmax, ndivx, 
"");
 
 6908      axis->
PaintAxis(p111x, p111y, p101x, p101y, bmin, bmax, ndivx, 
"");
 
 6910         axis->
PaintAxis(p100x, p100y, p101x, p101y, bmin, bmax, ndivx, 
"");
 
 6915      chopt[0] = 0; strlcat(chopt, 
"SDH+",10);
 
 6917         strlcat(chopt, 
"N",10);
 
 6920      xaxis->
PaintAxis(p000x, p000y, p100x, p100y, bmin, bmax, ndivx, chopt);
 
 6925      chopt[0] = 0; strlcat(chopt, 
"SDH+",10);
 
 6927         strlcat(chopt, 
"N",10);
 
 6930      yaxis->
PaintAxis(p100x, p100y, p110x, p110y, bmin, bmax, ndivy, chopt);
 
 6938            if (bmin <= 0) bmin=0.001*bmax;
 
 6939            zaxis->
PaintAxis(p110x, p110y, p111x, p111y, bmin, bmax, ndivz, 
"G+");
 
 6941            TF1 *
f1=
new TF1(
"f1",
"sqrt(x)",bmin,bmax);
 
 6942            TGaxis *a1 = 
new TGaxis(p110x, p110y, p111x, p111y, 
"f1", ndivz, 
"SDH+");
 
 6948            chopt[0] = 0; strlcat(chopt, 
"SDH+",10);
 
 6950               strlcat(chopt, 
"N",10);
 
 6953            zaxis->
PaintAxis(p110x, p110y, p111x, p111y, bmin, bmax, ndivz, chopt);
 
 6957      axis->
PaintAxis(p011x, p011y, p001x, p001y, bmin, bmax, ndivx, 
"");
 
 6958      axis->
PaintAxis(p101x, p101y, p001x, p001y, bmin, bmax, ndivx, 
"");
 
 6960         axis->
PaintAxis(p000x, p000y, p001x, p001y, bmin, bmax, ndivx, 
"");
 
 6965      chopt[0] = 0; strlcat(chopt, 
"SDH+",10);
 
 6967         strlcat(chopt, 
"N",10);
 
 6970      xaxis->
PaintAxis(p000x, p000y, p100x, p100y, bmin, bmax, ndivx, chopt);
 
 6975      chopt[0] = 0; strlcat(chopt, 
"SDH-",10);
 
 6977         strlcat(chopt, 
"N",10);
 
 6980      yaxis->
PaintAxis(p000x, p000y, p010x, p010y, bmin, bmax, ndivy, chopt);
 
 6988            if (bmin <= 0) bmin=0.001*bmax;
 
 6989            zaxis->
PaintAxis(p100x, p100y, p101x, p101y, bmin, bmax, ndivz, 
"G+");
 
 6991            TF1 *
f1=
new TF1(
"f1",
"sqrt(x)",bmin,bmax);
 
 6992            TGaxis *a1 = 
new TGaxis(p100x, p100y, p101x, p101y, 
"f1", ndivz, 
"SDH+");
 
 6998            chopt[0] = 0; strlcat(chopt, 
"SDH+",10);
 
 7000               strlcat(chopt, 
"N",10);
 
 7003            zaxis->
PaintAxis(p100x, p100y, p101x, p101y, bmin, bmax, ndivz, chopt);
 
 7007      axis->
PaintAxis(p111x, p111y, p011x, p011y, bmin, bmax, ndivx, 
"");
 
 7008      axis->
PaintAxis(p001x, p001y, p011x, p011y, bmin, bmax, ndivx, 
"");
 
 7010         axis->
PaintAxis(p010x, p010y, p011x, p011y, bmin, bmax, ndivx, 
"");
 
 7015      chopt[0] = 0; strlcat(chopt, 
"SDH-",10);
 
 7017         strlcat(chopt, 
"N",10);
 
 7020      xaxis->
PaintAxis(p010x, p010y, p110x, p110y, bmin, bmax, ndivx, chopt);
 
 7025      chopt[0] = 0; strlcat(chopt, 
"SDH-",10);
 
 7027         strlcat(chopt, 
"N",10);
 
 7030      yaxis->
PaintAxis(p000x, p000y, p010x, p010y, bmin, bmax, ndivy, chopt);
 
 7038            if (bmin <= 0) bmin=0.001*bmax;
 
 7039            zaxis->
PaintAxis(p000x, p000y, p001x, p001y, bmin, bmax, ndivz, 
"G+");
 
 7041            TF1 *
f1=
new TF1(
"f1",
"sqrt(x)",bmin,bmax);
 
 7042            TGaxis *a1 = 
new TGaxis(p000x, p000y, p001x, p001y, 
"f1", ndivz, 
"SDH+");
 
 7048            chopt[0] = 0; strlcat(chopt, 
"SDH+",10);
 
 7050               strlcat(chopt, 
"N",10);
 
 7053            zaxis->
PaintAxis(p000x, p000y, p001x, p001y, bmin, bmax, ndivz, 
"SDH+");
 
 7104   if (nodesx>1&&nodesy>1) {
 
 7119   if (alpha>=0&&alpha<=90&&beta>=0&&beta<=90&&alpha+beta<=90) {
 
 7164   if (
r>=0&&r<=255&&g>=0&&g<=255&&b>=0&&
b<=255) {
 
 7178   if (
x>=0&&
y>=0&&z>=0) {
 
 7231      if (weight>=0&&weight<=1) 
fLHweight = weight;
 
 7684   Int_t i1, i2, i3, i4, i5;
 
 7689   while (opt.
Tokenize(token, from, 
"[ (]")) {
 
 7695            printf(
"PaintSpectrum: Display modes groups should be in the [0,3] range\n");
 
 7699         if (i2<1 || i2>11) {
 
 7700            printf(
"PaintSpectrum: Display modes should be in the [1,11] range\n");
 
 7706      } 
else if (token==
"pa") {
 
 7713      } 
else if (token==
"n") {
 
 7719      } 
else if (token==
"ca") {
 
 7722            printf(
"PaintSpectrum: Color Algorithm should be in the [0,9] range\n");
 
 7728      } 
else if (token==
"zs") {
 
 7731            printf(
"PaintSpectrum: Z-Scale should be in the [0,2] range\n");
 
 7737      } 
else if (token==
"ci") {
 
 7744      } 
else if (token==
"lhw") {
 
 7749      } 
else if (token==
"lp") {
 
 7756      } 
else if (token==
"cw") {
 
 7761      } 
else if (token==
"b") {
 
 7764            printf(
"PaintSpectrum: Bezier should be in the [0,1] range\n");
 
 7770      } 
else if (token==
"s") {
 
 7773            printf(
"PaintSpectrum: Shading should be in the [0,1] range\n");
 
 7778            printf(
"PaintSpectrum: Shadow should be in the [0,1] range\n");
 
 7784      } 
else if (token==
"cm") {
 
 7793      } 
else if (token==
"cg") {
 
 7799      } 
else if (token==
"a" || token==
"a=") {
 
 7806      } 
else if (token==
"bf") {
 
 7814            printf(
"Unknown option \"%s\"\n",token.
Data());
 
static const double x4[22]
 
static const double x3[11]
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
 
Option_t Option_t TPoint TPoint const char x2
 
Option_t Option_t TPoint TPoint const char x1
 
Option_t Option_t TPoint TPoint const char y2
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t height
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char mx
 
Option_t Option_t TPoint TPoint const char y1
 
virtual Int_t GetNdivisions() const
 
virtual Color_t GetLineColor() const
Return the line color.
 
virtual void SetLineStyle(Style_t lstyle)
Set the line style.
 
virtual Width_t GetLineWidth() const
Return the line width.
 
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
 
virtual void ResetAttLine(Option_t *option="")
Reset this line attributes to default values.
 
virtual void SetLineColor(Color_t lcolor)
Set the line color.
 
virtual Style_t GetLineStyle() const
Return the line style.
 
Int_t GetLast() const
Return last bin on the axis i.e.
 
Int_t GetFirst() const
Return first bin on the axis i.e.
 
The color creation and management class.
 
static Int_t GetColor(const char *hexcolor)
Static method returning color number for color specified by hex color string of form: "#rrggbb",...
 
virtual void SetR1(Double_t r1)
 
virtual void SetX1(Double_t x1)
 
virtual void SetPhimax(Double_t phi=360)
 
void Paint(Option_t *option="") override
Paint this ellipse with its current attributes.
 
virtual void SetPhimin(Double_t phi=0)
 
virtual void SetY1(Double_t y1)
 
virtual void SetR2(Double_t r2)
 
virtual void SetTheta(Double_t theta=0)
 
virtual void PaintAxis(Double_t xmin, Double_t ymin, Double_t xmax, Double_t ymax, Double_t &wmin, Double_t &wmax, Int_t &ndiv, Option_t *chopt="", Double_t gridlength=0, Bool_t drawGridOnly=kFALSE)
Control function to draw an axis.
 
void SetLabelOffset(Float_t labeloffset)
 
Float_t GetLabelOffset() const
 
Float_t GetTickSize() const
 
void Paint(Option_t *chopt="") override
Draw this axis with its current attributes.
 
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 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...
 
Service class for 2-D histogram classes.
 
Double_t GetBinContent(Int_t binx, Int_t biny) const override
 
static void Optimize(Double_t A1, Double_t A2, Int_t nold, Double_t &BinLow, Double_t &BinHigh, Int_t &nbins, Double_t &BWID, Option_t *option="")
Static function to compute reasonable axis limits.
 
Use the TLine constructor to create a simple line.
 
virtual void PaintLine(Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Draw this line with new coordinates.
 
The TNamed class is the base class for all named ROOT classes.
 
<div class="legacybox"><h2>Legacy Code</h2> TSpectrum2Painter is a legacy interface: there will be no...
 
void GetZScale(Int_t &scale)
Gets z-axis scale:
 
void SetColorIncrements(Double_t r, Double_t g, Double_t b)
Sets color increments between two color levels for r, g, b components:
 
@ kChannelMarksStyleCross
 
@ kChannelMarksStyleTriangle
 
@ kChannelMarksStyleDiamond
 
@ kChannelMarksStyleRectangle
 
void ColorModel(unsigned ui, unsigned ui1, unsigned ui2, unsigned ui3)
This function calculates color for one palette entry given by function parameter ui.
 
void GetLightPosition(Int_t &x, Int_t &y, Int_t &z)
Gets position of fictive light source in 3D space:
 
void CopyEnvelope(Double_t xr, Double_t xs, Double_t yr, Double_t ys)
Copies envelope vector, which ensures hidden surface removal for the contours display mode.
 
Double_t BezierBlend(Int_t i, Double_t bezf)
This function calculates Bezier approximation.
 
void BezierSmoothing(Double_t bezf)
Calculates screen coordinates of the smoothed point.
 
Int_t BezC(Int_t i)
This function is called from BezierBlend function.
 
void DrawMarker(Int_t x, Int_t y, Int_t w, Int_t h, Int_t type)
Draws channel mark at the screen coordinates x, y.
 
Double_t ColorCalculation(Double_t dx1, Double_t dy1, Double_t z1, Double_t dx2, Double_t dy2, Double_t z2, Double_t dx3, Double_t dy3, Double_t z3)
Calculates and returns color value for the surface triangle given by function parameters: -dx1,...
 
void SetNodes(Int_t nodesx, Int_t nodesy)
Sets nodes in both directions:
 
void SetPenAttr(Int_t color, Int_t style, Int_t width)
Sets pen attributes:
 
void SetDisplayMode(Int_t modeGroup, Int_t displayMode)
Sets display group mode and display mode:
 
void GetContourWidth(Int_t &width)
Gets width between horizontal slices:
 
void SetLightPosition(Int_t x, Int_t y, Int_t z)
Sets position of fictive light source in 3D space:
 
Int_t fNewColorIndex
buffers' size
 
void GetDisplayMode(Int_t &modeGroup, Int_t &displayMode)
Gets display group mode and display mode: -modeGroup - the following group modes might have been set:...
 
void GetNodes(Int_t &nodesx, Int_t &nodesy)
Gets nodes in both directions:
 
void GetPenAttr(Int_t &color, Int_t &style, Int_t &width)
Gets pen attributes: -color - color of spectrum -style - style of pen (solid, dash,...
 
void GetBezier(Int_t &bezier)
Gets Bezier smoothing switch:
 
void EnvelopeBars(Int_t x1, Int_t y1, Int_t x2, Int_t y2)
Ensures hidden surface removal for Bars, BarsX and BarsY display modes.
 
void GetLightHeightWeight(Double_t &weight)
Gets weight between shading according to fictive light source and according to channels counts:
 
void SetAngles(Int_t alpha, Int_t beta, Int_t view)
Sets angles of the view:
 
void SetZScale(Int_t scale)
Sets z-axis scale:
 
void Paint(Option_t *option) override
Paints histogram according to preset parameters.
 
void Slice(Double_t xr, Double_t yr, Double_t xs, Double_t ys, TLine *line)
Calculates screen coordinates of the line given by two nodes for contours display mode.
 
void GetColorAlgorithm(Int_t &colorAlgorithm)
Gets shading color algorithm:
 
static void PaintSpectrum(TH2 *h2, Option_t *option="", Int_t bs=1600)
This function allows to set all the possible options available in TSpectrum2Painter and paint "h2".
 
Short_t * fEnvelopeContour
 
void SetChanGrid(Int_t enable, Int_t color)
This function sets enables/disables drawing of channel grid and sets its color: -enable - decides whe...
 
void GetChanGrid(Int_t &enable, Int_t &color)
This function gets attributes for drawing channel:
 
void SetLightHeightWeight(Double_t weight)
Sets weight between shading according to fictive light source and according to channels counts:
 
void SetContourWidth(Int_t width)
Sets width between horizontal slices:
 
void SetColorAlgorithm(Int_t colorAlgorithm)
Sets shading color algorithm:
 
void SetShading(Int_t shading, Int_t shadow)
Sets on/off shading and shadow switches:
 
void GetChanMarks(Int_t &enable, Int_t &color, Int_t &width, Int_t &height, Int_t &style)
Gets drawing attributes for channel marks:
 
void Envelope(Int_t x1, Int_t y1, Int_t x2, Int_t y2)
Ensures hidden surface removal.
 
void SetBezier(Int_t bezier)
Sets on/off Bezier smoothing:
 
void Transform(Int_t it, Int_t jt, Int_t zmt)
Reads out the value from histogram and calculates screen coordinates.
 
void GetColorIncrements(Double_t &r, Double_t &g, Double_t &b)
Gets color increments between two color levels for r, g, b components:
 
void SetChanMarks(Int_t enable, Int_t color, Int_t width, Int_t height, Int_t style)
Sets enables/disables drawing of channel marks and sets their attributes:
 
void GetAngles(Int_t &alpha, Int_t &beta, Int_t &view)
Gets angles of the view:
 
~TSpectrum2Painter() override
TSpectrum2Painter destructor.
 
Int_t fMaximumXScreenResolution
 
Double_t ShadowColorCalculation(Double_t xtaz, Double_t ytaz, Double_t ztaz, Double_t shad_noise)
Determines whether the center of the triangle in 3-d space given by function parameters:
 
void GetShading(Int_t &shading, Int_t &shadow)
Gets shading and shadow switches:
 
Int_t Atoi() const
Return integer value of string.
 
Double_t Atof() const
Return floating-point value contained in string.
 
const char * Data() const
 
TObjArray * Tokenize(const TString &delim) const
This function is used to isolate sequential tokens in a TString.
 
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
 
Short_t Max(Short_t a, Short_t b)
Returns the largest of a and b.
 
Short_t Min(Short_t a, Short_t b)
Returns the smallest of a and b.
 
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.