ROOT logo
// @(#)root/graf:$Id: TDiamond.cxx 20882 2007-11-19 11:31:26Z rdm $
// Author: Rene Brun   22/06/96

/*************************************************************************
 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#include <stdlib.h>

#include "Riostream.h"
#include "TBufferFile.h"
#include "TROOT.h"
#include "TDiamond.h"
#include "TVirtualPad.h"
#include "TVirtualX.h"
#include "TMath.h"


ClassImp(TDiamond)

//______________________________________________________________________________
//
// A diamond is defined by :
//   - Its central left coordinates x1,y1
//   - Its top central coordinates x2,y2
//
// A diamond has line attributes (see TAttLine)
//   and fill area attributes (see TAttFill).
//
// Like for the class TPaveText, a TDiamond may have one or more line(s)
// of text inside.
//Begin_Html
/*
<img src="gif/diamond.gif">
*/
//End_Html
//

//______________________________________________________________________________
TDiamond::TDiamond(): TPaveText()
{
   // Diamond default constructor.

}

//______________________________________________________________________________
TDiamond::TDiamond(Double_t x1, Double_t y1,Double_t x2, Double_t  y2)
     :TPaveText(x1,y1,x2,y2)
{
   // Diamond standard constructor.
}

//______________________________________________________________________________
TDiamond::~TDiamond()
{
   // Diamond destructor.

}

//______________________________________________________________________________
TDiamond::TDiamond(const TDiamond &diamond) : TPaveText()
{
   // Copy constructor.

   TBufferFile b(TBuffer::kWrite);
   TDiamond *p = (TDiamond*)(&diamond);
   p->Streamer(b);
   b.SetReadMode();
   b.SetBufferOffset(0);
   Streamer(b);
}

//______________________________________________________________________________
Int_t TDiamond::DistancetoPrimitive(Int_t px, Int_t py)
{
   // Compute distance from point px,py to a diamond.
   //
   //  Compute the closest distance of approach from point px,py to the
   //  edges of this diamond.
   //  The distance is computed in pixels units.

   return TPaveText::DistancetoPrimitive(px,py);
}

//______________________________________________________________________________
void TDiamond::Draw(Option_t *option)
{
   // Draw this diamond with its current attributes.

   AppendPad(option);

}

//______________________________________________________________________________
void TDiamond::ExecuteEvent(Int_t event, Int_t px, Int_t py)
{
   // Execute action corresponding to one event.
   //
   //  This member function is called when a Diamond object is clicked.
   //
   //  If the mouse is clicked inside the diamond, the diamond is moved.
   //
   //  If the mouse is clicked on the 4 tops (pL,pR,pTop,pBot), the diamond is rscaled.
   //
   //
   //                           pTop
   //                        +---------+
   //                        |   / \   |
   //                        |  /   \  |
   //                        | /     \ |
   //                      pL|/pinside\|pR
   //                        |\       /|
   //                        | \     / |
   //                        |  \   /  |
   //                        |   \ /   |
   //                        +---------+
   //                            pBot

   const Int_t kMaxDiff = 5;
   const Int_t kMinSize = 20;

   static Int_t px1, px2, py1, py2, pxl, pyl, pxt, pyt, pxold, pyold;
   static Int_t px1p, px2p, py1p, py2p;
   static Int_t pTx,pTy,pLx,pLy,pRx,pRy,pBx,pBy;
   static Double_t x1c,x2c,x3c,x4c;
   static Bool_t pTop, pL, pR, pBot, pINSIDE;
   static Int_t i,x[5], y[5];
   Int_t  wx, wy;
   TVirtualPad  *parent;
   Bool_t doing_again = kFALSE;
   Bool_t opaque  = gPad->OpaqueMoving();
   Bool_t ropaque = gPad->OpaqueResizing();

   if (!gPad->IsEditable()) return;

   parent = gPad;

again:

   switch (event) {

   case kButton1Down:

      gVirtualX->SetLineColor(-1);
      TAttLine::Modify();  //Change line attributes only if necessary
      if (GetFillColor())
         gVirtualX->SetLineColor(GetFillColor());
      else
         gVirtualX->SetLineColor(1);
      gVirtualX->SetLineWidth(2);

      // No break !!!

   case kMouseMotion:

      px1 = gPad->XtoAbsPixel(GetX1());
      py1 = gPad->YtoAbsPixel(GetY1());
      px2 = gPad->XtoAbsPixel(GetX2());
      py2 = gPad->YtoAbsPixel(GetY2());

      if (px1 < px2) {
         pxl = px1;
         pxt = px2;
      } else {
         pxl = px2;
         pxt = px1;
      }
      if (py1 < py2) {
         pyl = py1;
         pyt = py2;
      } else {
         pyl = py2;
         pyt = py1;
      }

      px1p = parent->XtoAbsPixel(parent->GetX1()) + parent->GetBorderSize();
      py1p = parent->YtoAbsPixel(parent->GetY1()) - parent->GetBorderSize();
      px2p = parent->XtoAbsPixel(parent->GetX2()) - parent->GetBorderSize();
      py2p = parent->YtoAbsPixel(parent->GetY2()) + parent->GetBorderSize();

      pTx = pBx = (pxl+pxt)/2;
      pLy = pRy = (pyl+pyt)/2;
      pTy = pyl;
      pBy = pyt;
      pLx = pxl;
      pRx = pxt;

      pTop = pL = pR = pBot = pINSIDE = kFALSE;

      if ((TMath::Abs(px-(pxl+pxt)/2) < kMaxDiff) &&
          (TMath::Abs(py - pyl) < kMaxDiff)) {             // top edge
         pxold = pxl; pyold = pyl; pTop = kTRUE;
         gPad->SetCursor(kTopSide);
      }

      if ((TMath::Abs(px-(pxl+pxt)/2) < kMaxDiff) &&
          (TMath::Abs(py - pyt) < kMaxDiff)) {             // bottom edge
         pxold = pxt; pyold = pyt; pBot = kTRUE;
         gPad->SetCursor(kBottomSide);
      }

      if ((TMath::Abs(py-(pyl+pyt)/2) < kMaxDiff) &&
          (TMath::Abs(px - pxl) < kMaxDiff)) {             // left edge
         pxold = pxl; pyold = pyl; pL = kTRUE;
         gPad->SetCursor(kLeftSide);
      }

      if ((TMath::Abs(py-(pyl+pyt)/2) < kMaxDiff) &&
          (TMath::Abs(px - pxt) < kMaxDiff)) {             // right edge
         pxold = pxt; pyold = pyt; pR = kTRUE;
         gPad->SetCursor(kRightSide);
      }

      x1c = (py-pTy)*(pTx-pLx)/(pTy-pLy)+pTx;
      x2c = (py-pTy)*(pRx-pTx)/(pRy-pTy)+pTx;
      x3c = (py-pRy)*(pRx-pBx)/(pRy-pBy)+pRx;
      x4c = (py-pBy)*(pBx-pLx)/(pBy-pLy)+pBx;

      if (px > x1c+kMaxDiff && px < x2c-kMaxDiff &&
          px > x4c+kMaxDiff && px < x3c-kMaxDiff) {    // inside box
         pxold = px; pyold = py; pINSIDE = kTRUE;
         if (event == kButton1Down)
            gPad->SetCursor(kMove);
         else
            gPad->SetCursor(kCross);
      }

      fResizing = kFALSE;
      if (pTop || pL || pR || pBot)
         fResizing = kTRUE;

      if (!pTop && !pL && !pR && !pBot && !pINSIDE)
         gPad->SetCursor(kCross);

      break;

   case kButton1Motion:

      wx = wy = 0;
      x[0] = x[2] = x[4] = (px1+px2)/2;
      x[1] = px2;
      x[3] = px1;
      y[0] = y[4] = py1;
      y[2] = py2;
      y[1] = y[3] = (py1+py2)/2;
      if (pTop) {
         for (i=0;i<4;i++) gVirtualX->DrawLine(x[i], y[i], x[i+1], y[i+1]);
         py2 += py - pyold;
         if (py2 > py1-kMinSize) { py2 = py1-kMinSize; wy = py2; }
         if (py2 < py2p) { py2 = py2p; wy = py2; }
         y[2] = py2;
         y[1] = y[3] = (py1+py2)/2;
         for (i=0;i<4;i++) gVirtualX->DrawLine(x[i], y[i], x[i+1], y[i+1]);
      }
      if (pBot) {
         for (i=0;i<4;i++) gVirtualX->DrawLine(x[i], y[i], x[i+1], y[i+1]);
         py1 += py - pyold;
         if (py1 < py2+kMinSize) { py1 = py2+kMinSize; wy = py1; }
         if (py1 > py1p) { py1 = py1p; wy = py1; }
         y[0] = y[4] = py1;
         y[1] = y[3] = (py1+py2)/2;
         for (i=0;i<4;i++) gVirtualX->DrawLine(x[i], y[i], x[i+1], y[i+1]);
      }
      if (pL) {
         for (i=0;i<4;i++) gVirtualX->DrawLine(x[i], y[i], x[i+1], y[i+1]);
         px1 += px - pxold;
         if (px1 > px2-kMinSize) { px1 = px2-kMinSize; wx = px1; }
         if (px1 < px1p) { px1 = px1p; wx = px1; }
         x[3] = px1;
         x[0] = x[2] = x[4] = (px1+px2)/2;
         for (i=0;i<4;i++) gVirtualX->DrawLine(x[i], y[i], x[i+1], y[i+1]);
      }
      if (pR) {
         for (i=0;i<4;i++) gVirtualX->DrawLine(x[i], y[i], x[i+1], y[i+1]);
         px2 += px - pxold;
         if (px2 < px1+kMinSize) { px2 = px1+kMinSize; wx = px2; }
         if (px2 > px2p) { px2 = px2p; wx = px2; }
         x[1] = px2;
         x[0] = x[2] = x[4] = (px1+px2)/2;
         for (i=0;i<4;i++) gVirtualX->DrawLine(x[i], y[i], x[i+1], y[i+1]);
      }
      if (pINSIDE) {
         for (i=0;i<4;i++) gVirtualX->DrawLine(x[i], y[i], x[i+1], y[i+1]);
         Int_t dx = px - pxold;
         Int_t dy = py - pyold;
         px1 += dx; py1 += dy; px2 += dx; py2 += dy;
         if (px1 < px1p) { dx = px1p - px1; px1 += dx; px2 += dx; wx = px+dx; }
         if (px2 > px2p) { dx = px2 - px2p; px1 -= dx; px2 -= dx; wx = px-dx; }
         if (py1 > py1p) { dy = py1 - py1p; py1 -= dy; py2 -= dy; wy = py-dy; }
         if (py2 < py2p) { dy = py2p - py2; py1 += dy; py2 += dy; wy = py+dy; }
         x[0] = x[2] = x[4] = (px1+px2)/2;
         x[1] = px2;
         x[3] = px1;
         y[0] = y[4] = py1;
         y[2] = py2;
         y[1] = y[3] = (py1+py2)/2;
         for (i=0;i<4;i++) gVirtualX->DrawLine(x[i], y[i], x[i+1], y[i+1]);
      }

      if (wx || wy) {
         if (wx) px = wx;
         if (wy) py = wy;
         gVirtualX->Warp(px, py);
      }

      pxold = px;
      pyold = py;

      if ((pINSIDE && opaque) || (fResizing && ropaque)) {
         event = kButton1Up;
         doing_again = kTRUE;
         goto again;
      }

      break;

   case kButton1Up:

      if (pTop || pBot || pL || pR || pINSIDE) {
         fX1 = gPad->AbsPixeltoX(px1);
         fY1 = gPad->AbsPixeltoY(py1);
         fX2 = gPad->AbsPixeltoX(px2);
         fY2 = gPad->AbsPixeltoY(py2);
      }

      if (pINSIDE) {
         // if it was not a pad that was moved then it must have been
         // a box or something like that so we have to redraw the pad
         if (parent == gPad) gPad->Modified(kTRUE);
         if (!doing_again) gPad->SetCursor(kCross);
      }

      if (pTop || pL || pR || pBot)
         gPad->Modified(kTRUE);

      gVirtualX->SetLineColor(-1);
      gVirtualX->SetLineWidth(-1);

      break;

   case kButton1Locate:

      ExecuteEvent(kButton1Down, px, py);

      while (1) {
         px = py = 0;
         event = gVirtualX->RequestLocator(1, 1, px, py);

         ExecuteEvent(kButton1Motion, px, py);

         if (event != -1) {                     // button is released
            ExecuteEvent(kButton1Up, px, py);
            return;
         }
      }
   }
}

//______________________________________________________________________________
void TDiamond::Paint(Option_t *)
{
   // Paint this diamond with its current attributes.

   Double_t x[7],y[7],depx,depy;
   Double_t x1 = fX1;
   Double_t y1 = fY1;
   Double_t x2 = fX2;
   Double_t y2 = fY2;
   Int_t fillstyle = GetFillStyle();
   Int_t fillcolor = GetFillColor();
   Int_t linecolor = GetLineColor();
   if (fBorderSize) {
      Double_t wy = gPad->PixeltoY(0) - gPad->PixeltoY(fBorderSize);
      Double_t wx = gPad->PixeltoX(fBorderSize) - gPad->PixeltoX(0);
      // Draw the frame top right
      if (y2-y1>x2-x1) {
         depx = wx;
         depy = 0;
         }
      else if (y2-y1<x2-x1) {
         depx = 0;
         depy = -wy;
         }
      else {
         depx = wx;
         depy = -wy;
      }
      x[0] = x[2] = (x1+x2)/2+depx;
      x[1] = x2+depx;
      x[3] = x1+depx;
      y[0] = y2+depy;
      y[2] = y1+depy;
      y[1] = y[3] =(y1+y2)/2+depy;
      x[4] = x[0]; y[4] = y[0];
      SetFillStyle(fillstyle);
      SetFillColor(linecolor);
      TAttFill::Modify();  //Change fill area attributes only if necessary
      gPad->PaintFillArea(4,x,y);
   }
   x[0] = x[2] = (x1+x2)/2;
   x[1] = x2;
   x[3] = x1;
   y[0] = y2;
   y[2] = y1;
   y[1] = y[3] = (y1+y2)/2;
   x[4] = x[0]; y[4] =y[0];
   SetLineColor(linecolor);
   SetFillColor(fillcolor);
   TAttLine::Modify();  //Change line attributes only if necessary
   TAttFill::Modify();  //Change fill area attributes only if necessary
   gPad->PaintFillArea(4,x,y);
   gPad->PaintPolyLine(5,x,y);

   // Paint list of primitives (test,etc)
   PaintPrimitives(kDiamond);
}

//______________________________________________________________________________
void TDiamond::SavePrimitive(ostream &out, Option_t * /*= ""*/)
{
   // Save primitive as a C++ statement(s) on output stream out.

   if (gROOT->ClassSaved(TDiamond::Class())) {
      out<<"   ";
   } else {
      out<<"   TDiamond *";
   }
   out<<"diamond = new TDiamond("<<fX1<<","<<fY1<<","<<fX2<<","<<fY2<<");"<<endl;

   SaveFillAttributes(out,"diamond",0,1001);
   SaveLineAttributes(out,"diamond",1,1,1);
   SaveTextAttributes(out,"diamond",11,0,1,62,0.05);

   SaveLines(out,"diamond");
   out<<"   diamond->Draw();"<<endl;
}
 TDiamond.cxx:1
 TDiamond.cxx:2
 TDiamond.cxx:3
 TDiamond.cxx:4
 TDiamond.cxx:5
 TDiamond.cxx:6
 TDiamond.cxx:7
 TDiamond.cxx:8
 TDiamond.cxx:9
 TDiamond.cxx:10
 TDiamond.cxx:11
 TDiamond.cxx:12
 TDiamond.cxx:13
 TDiamond.cxx:14
 TDiamond.cxx:15
 TDiamond.cxx:16
 TDiamond.cxx:17
 TDiamond.cxx:18
 TDiamond.cxx:19
 TDiamond.cxx:20
 TDiamond.cxx:21
 TDiamond.cxx:22
 TDiamond.cxx:23
 TDiamond.cxx:24
 TDiamond.cxx:25
 TDiamond.cxx:26
 TDiamond.cxx:27
 TDiamond.cxx:28
 TDiamond.cxx:29
 TDiamond.cxx:30
 TDiamond.cxx:31
 TDiamond.cxx:32
 TDiamond.cxx:33
 TDiamond.cxx:34
 TDiamond.cxx:35
 TDiamond.cxx:36
 TDiamond.cxx:37
 TDiamond.cxx:38
 TDiamond.cxx:39
 TDiamond.cxx:40
 TDiamond.cxx:41
 TDiamond.cxx:42
 TDiamond.cxx:43
 TDiamond.cxx:44
 TDiamond.cxx:45
 TDiamond.cxx:46
 TDiamond.cxx:47
 TDiamond.cxx:48
 TDiamond.cxx:49
 TDiamond.cxx:50
 TDiamond.cxx:51
 TDiamond.cxx:52
 TDiamond.cxx:53
 TDiamond.cxx:54
 TDiamond.cxx:55
 TDiamond.cxx:56
 TDiamond.cxx:57
 TDiamond.cxx:58
 TDiamond.cxx:59
 TDiamond.cxx:60
 TDiamond.cxx:61
 TDiamond.cxx:62
 TDiamond.cxx:63
 TDiamond.cxx:64
 TDiamond.cxx:65
 TDiamond.cxx:66
 TDiamond.cxx:67
 TDiamond.cxx:68
 TDiamond.cxx:69
 TDiamond.cxx:70
 TDiamond.cxx:71
 TDiamond.cxx:72
 TDiamond.cxx:73
 TDiamond.cxx:74
 TDiamond.cxx:75
 TDiamond.cxx:76
 TDiamond.cxx:77
 TDiamond.cxx:78
 TDiamond.cxx:79
 TDiamond.cxx:80
 TDiamond.cxx:81
 TDiamond.cxx:82
 TDiamond.cxx:83
 TDiamond.cxx:84
 TDiamond.cxx:85
 TDiamond.cxx:86
 TDiamond.cxx:87
 TDiamond.cxx:88
 TDiamond.cxx:89
 TDiamond.cxx:90
 TDiamond.cxx:91
 TDiamond.cxx:92
 TDiamond.cxx:93
 TDiamond.cxx:94
 TDiamond.cxx:95
 TDiamond.cxx:96
 TDiamond.cxx:97
 TDiamond.cxx:98
 TDiamond.cxx:99
 TDiamond.cxx:100
 TDiamond.cxx:101
 TDiamond.cxx:102
 TDiamond.cxx:103
 TDiamond.cxx:104
 TDiamond.cxx:105
 TDiamond.cxx:106
 TDiamond.cxx:107
 TDiamond.cxx:108
 TDiamond.cxx:109
 TDiamond.cxx:110
 TDiamond.cxx:111
 TDiamond.cxx:112
 TDiamond.cxx:113
 TDiamond.cxx:114
 TDiamond.cxx:115
 TDiamond.cxx:116
 TDiamond.cxx:117
 TDiamond.cxx:118
 TDiamond.cxx:119
 TDiamond.cxx:120
 TDiamond.cxx:121
 TDiamond.cxx:122
 TDiamond.cxx:123
 TDiamond.cxx:124
 TDiamond.cxx:125
 TDiamond.cxx:126
 TDiamond.cxx:127
 TDiamond.cxx:128
 TDiamond.cxx:129
 TDiamond.cxx:130
 TDiamond.cxx:131
 TDiamond.cxx:132
 TDiamond.cxx:133
 TDiamond.cxx:134
 TDiamond.cxx:135
 TDiamond.cxx:136
 TDiamond.cxx:137
 TDiamond.cxx:138
 TDiamond.cxx:139
 TDiamond.cxx:140
 TDiamond.cxx:141
 TDiamond.cxx:142
 TDiamond.cxx:143
 TDiamond.cxx:144
 TDiamond.cxx:145
 TDiamond.cxx:146
 TDiamond.cxx:147
 TDiamond.cxx:148
 TDiamond.cxx:149
 TDiamond.cxx:150
 TDiamond.cxx:151
 TDiamond.cxx:152
 TDiamond.cxx:153
 TDiamond.cxx:154
 TDiamond.cxx:155
 TDiamond.cxx:156
 TDiamond.cxx:157
 TDiamond.cxx:158
 TDiamond.cxx:159
 TDiamond.cxx:160
 TDiamond.cxx:161
 TDiamond.cxx:162
 TDiamond.cxx:163
 TDiamond.cxx:164
 TDiamond.cxx:165
 TDiamond.cxx:166
 TDiamond.cxx:167
 TDiamond.cxx:168
 TDiamond.cxx:169
 TDiamond.cxx:170
 TDiamond.cxx:171
 TDiamond.cxx:172
 TDiamond.cxx:173
 TDiamond.cxx:174
 TDiamond.cxx:175
 TDiamond.cxx:176
 TDiamond.cxx:177
 TDiamond.cxx:178
 TDiamond.cxx:179
 TDiamond.cxx:180
 TDiamond.cxx:181
 TDiamond.cxx:182
 TDiamond.cxx:183
 TDiamond.cxx:184
 TDiamond.cxx:185
 TDiamond.cxx:186
 TDiamond.cxx:187
 TDiamond.cxx:188
 TDiamond.cxx:189
 TDiamond.cxx:190
 TDiamond.cxx:191
 TDiamond.cxx:192
 TDiamond.cxx:193
 TDiamond.cxx:194
 TDiamond.cxx:195
 TDiamond.cxx:196
 TDiamond.cxx:197
 TDiamond.cxx:198
 TDiamond.cxx:199
 TDiamond.cxx:200
 TDiamond.cxx:201
 TDiamond.cxx:202
 TDiamond.cxx:203
 TDiamond.cxx:204
 TDiamond.cxx:205
 TDiamond.cxx:206
 TDiamond.cxx:207
 TDiamond.cxx:208
 TDiamond.cxx:209
 TDiamond.cxx:210
 TDiamond.cxx:211
 TDiamond.cxx:212
 TDiamond.cxx:213
 TDiamond.cxx:214
 TDiamond.cxx:215
 TDiamond.cxx:216
 TDiamond.cxx:217
 TDiamond.cxx:218
 TDiamond.cxx:219
 TDiamond.cxx:220
 TDiamond.cxx:221
 TDiamond.cxx:222
 TDiamond.cxx:223
 TDiamond.cxx:224
 TDiamond.cxx:225
 TDiamond.cxx:226
 TDiamond.cxx:227
 TDiamond.cxx:228
 TDiamond.cxx:229
 TDiamond.cxx:230
 TDiamond.cxx:231
 TDiamond.cxx:232
 TDiamond.cxx:233
 TDiamond.cxx:234
 TDiamond.cxx:235
 TDiamond.cxx:236
 TDiamond.cxx:237
 TDiamond.cxx:238
 TDiamond.cxx:239
 TDiamond.cxx:240
 TDiamond.cxx:241
 TDiamond.cxx:242
 TDiamond.cxx:243
 TDiamond.cxx:244
 TDiamond.cxx:245
 TDiamond.cxx:246
 TDiamond.cxx:247
 TDiamond.cxx:248
 TDiamond.cxx:249
 TDiamond.cxx:250
 TDiamond.cxx:251
 TDiamond.cxx:252
 TDiamond.cxx:253
 TDiamond.cxx:254
 TDiamond.cxx:255
 TDiamond.cxx:256
 TDiamond.cxx:257
 TDiamond.cxx:258
 TDiamond.cxx:259
 TDiamond.cxx:260
 TDiamond.cxx:261
 TDiamond.cxx:262
 TDiamond.cxx:263
 TDiamond.cxx:264
 TDiamond.cxx:265
 TDiamond.cxx:266
 TDiamond.cxx:267
 TDiamond.cxx:268
 TDiamond.cxx:269
 TDiamond.cxx:270
 TDiamond.cxx:271
 TDiamond.cxx:272
 TDiamond.cxx:273
 TDiamond.cxx:274
 TDiamond.cxx:275
 TDiamond.cxx:276
 TDiamond.cxx:277
 TDiamond.cxx:278
 TDiamond.cxx:279
 TDiamond.cxx:280
 TDiamond.cxx:281
 TDiamond.cxx:282
 TDiamond.cxx:283
 TDiamond.cxx:284
 TDiamond.cxx:285
 TDiamond.cxx:286
 TDiamond.cxx:287
 TDiamond.cxx:288
 TDiamond.cxx:289
 TDiamond.cxx:290
 TDiamond.cxx:291
 TDiamond.cxx:292
 TDiamond.cxx:293
 TDiamond.cxx:294
 TDiamond.cxx:295
 TDiamond.cxx:296
 TDiamond.cxx:297
 TDiamond.cxx:298
 TDiamond.cxx:299
 TDiamond.cxx:300
 TDiamond.cxx:301
 TDiamond.cxx:302
 TDiamond.cxx:303
 TDiamond.cxx:304
 TDiamond.cxx:305
 TDiamond.cxx:306
 TDiamond.cxx:307
 TDiamond.cxx:308
 TDiamond.cxx:309
 TDiamond.cxx:310
 TDiamond.cxx:311
 TDiamond.cxx:312
 TDiamond.cxx:313
 TDiamond.cxx:314
 TDiamond.cxx:315
 TDiamond.cxx:316
 TDiamond.cxx:317
 TDiamond.cxx:318
 TDiamond.cxx:319
 TDiamond.cxx:320
 TDiamond.cxx:321
 TDiamond.cxx:322
 TDiamond.cxx:323
 TDiamond.cxx:324
 TDiamond.cxx:325
 TDiamond.cxx:326
 TDiamond.cxx:327
 TDiamond.cxx:328
 TDiamond.cxx:329
 TDiamond.cxx:330
 TDiamond.cxx:331
 TDiamond.cxx:332
 TDiamond.cxx:333
 TDiamond.cxx:334
 TDiamond.cxx:335
 TDiamond.cxx:336
 TDiamond.cxx:337
 TDiamond.cxx:338
 TDiamond.cxx:339
 TDiamond.cxx:340
 TDiamond.cxx:341
 TDiamond.cxx:342
 TDiamond.cxx:343
 TDiamond.cxx:344
 TDiamond.cxx:345
 TDiamond.cxx:346
 TDiamond.cxx:347
 TDiamond.cxx:348
 TDiamond.cxx:349
 TDiamond.cxx:350
 TDiamond.cxx:351
 TDiamond.cxx:352
 TDiamond.cxx:353
 TDiamond.cxx:354
 TDiamond.cxx:355
 TDiamond.cxx:356
 TDiamond.cxx:357
 TDiamond.cxx:358
 TDiamond.cxx:359
 TDiamond.cxx:360
 TDiamond.cxx:361
 TDiamond.cxx:362
 TDiamond.cxx:363
 TDiamond.cxx:364
 TDiamond.cxx:365
 TDiamond.cxx:366
 TDiamond.cxx:367
 TDiamond.cxx:368
 TDiamond.cxx:369
 TDiamond.cxx:370
 TDiamond.cxx:371
 TDiamond.cxx:372
 TDiamond.cxx:373
 TDiamond.cxx:374
 TDiamond.cxx:375
 TDiamond.cxx:376
 TDiamond.cxx:377
 TDiamond.cxx:378
 TDiamond.cxx:379
 TDiamond.cxx:380
 TDiamond.cxx:381
 TDiamond.cxx:382
 TDiamond.cxx:383
 TDiamond.cxx:384
 TDiamond.cxx:385
 TDiamond.cxx:386
 TDiamond.cxx:387
 TDiamond.cxx:388
 TDiamond.cxx:389
 TDiamond.cxx:390
 TDiamond.cxx:391
 TDiamond.cxx:392
 TDiamond.cxx:393
 TDiamond.cxx:394
 TDiamond.cxx:395
 TDiamond.cxx:396
 TDiamond.cxx:397
 TDiamond.cxx:398
 TDiamond.cxx:399
 TDiamond.cxx:400
 TDiamond.cxx:401
 TDiamond.cxx:402
 TDiamond.cxx:403
 TDiamond.cxx:404
 TDiamond.cxx:405
 TDiamond.cxx:406
 TDiamond.cxx:407
 TDiamond.cxx:408
 TDiamond.cxx:409
 TDiamond.cxx:410
 TDiamond.cxx:411
 TDiamond.cxx:412
 TDiamond.cxx:413
 TDiamond.cxx:414
 TDiamond.cxx:415
 TDiamond.cxx:416
 TDiamond.cxx:417
 TDiamond.cxx:418
 TDiamond.cxx:419
 TDiamond.cxx:420
 TDiamond.cxx:421
 TDiamond.cxx:422
 TDiamond.cxx:423
 TDiamond.cxx:424
 TDiamond.cxx:425
 TDiamond.cxx:426
 TDiamond.cxx:427
 TDiamond.cxx:428
 TDiamond.cxx:429
 TDiamond.cxx:430
 TDiamond.cxx:431
 TDiamond.cxx:432
 TDiamond.cxx:433
 TDiamond.cxx:434
 TDiamond.cxx:435
 TDiamond.cxx:436
 TDiamond.cxx:437
 TDiamond.cxx:438
 TDiamond.cxx:439
 TDiamond.cxx:440