Changeset 344 in Sophya for trunk/SophyaPI/PIext/pintuple.cc


Ignore:
Timestamp:
Aug 2, 1999, 6:52:49 PM (26 years ago)
Author:
ercodmgr
Message:

1/ Extension de fonctionalites de gestion de repertoires (Lock, ...)
2/ Plus de NTupIntf_Adapter quand les objets heritent de NTupleInterface
3/ Support pour affichage info texte, ds PINtuple et PIStarList

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaPI/PIext/pintuple.cc

    r336 r344  
    9797msz = mMSz;
    9898if (msz < 1) msz = 1;
    99 g->SelMarker(sz, mrk);
     99g->SelMarker(msz, mrk);
    100100
    101101nok = 0; 
     
    136136}
    137137
     138/* --Methode-- */
     139void PINTuple::AppendTextInfo(string& info, double xmin, double ymin, double xmax, double ymax)
     140{
     141if (!mNT) return;
     142if ( (xK < 0) || (yK < 0) )  return;
     143
     144int ncnt = 0;
     145double xp,yp;
     146char buff[128];
     147sprintf(buff,"PINTuple: NLines= %d  NCol= %d \n", mNT->NbLines(),  mNT->NbColumns());
     148info += buff;
     149info += mNT->LineHeaderToString();
     150for (int i=0; i<mNT->NbLines(); i++) {
     151  xp = mNT->GetCell(i, xK);
     152  yp = mNT->GetCell(i, yK);
     153  if ( (xp < xmin) || (xp > xmax) || (yp < ymin) || (yp > ymax) )  continue;
     154  ncnt++;
     155  if (ncnt > 101) continue;
     156  info += mNT->LineToString(i);
     157  }
     158if (ncnt >= 101) info += " .... \n";
     159sprintf(buff," %d points inside selected region \n", ncnt);
     160info += buff;
     161// printf("PINTuple::AppendTextInfo()-DBG %g %g %g %g - %d\n", xmin, ymin, xmax, ymax, ncnt);
     162return;
     163}
Note: See TracChangeset for help on using the changeset viewer.