Changeset 1880 in Sophya


Ignore:
Timestamp:
Jan 21, 2002, 6:13:05 PM (24 years ago)
Author:
ansari
Message:

Adaptation/implementation de la methode PIDrawer/PIHisto2D::GetClickInfo() - Reza 21/01/2002

Location:
trunk/SophyaPI/PIext
Files:
2 edited

Legend:

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

    r1862 r1880  
    351351
    352352//++
     353void PIHisto2D::GetClickInfo(string& info, double x, double y)
     354//
     355//      Info specifique du drawer pour la position x,y
     356//--
     357{
     358  Histo2D* h = Histogram();
     359  if (h == NULL) return;
     360  int i,j;
     361  char str[128];
     362
     363  h->FindBin(x,y,i,j);
     364  if(i<0 || i>=h->NBinX() || j<0 || j>=h->NBinY()) info += " ???";
     365  else {
     366    sprintf(str," v= %g",x,y,(*h)(i,j));
     367    info += str;
     368  }
     369  return;
     370}
     371
     372//++
    353373void PIHisto2D::DrawStats(PIGraphicUC* g)
    354374//
  • trunk/SophyaPI/PIext/pihisto2d.h

    r1862 r1880  
    2929
    3030  virtual void Draw(PIGraphicUC* g,double xmin,double ymin,double xmax,double ymax);
     31
     32  //   AppendTextInfo a faire un jour - Reza 21/01/2002
     33  //  virtual void AppendTextInfo(string& info, double xmin, double ymin, double xmax, double ymax);
     34  virtual void GetClickInfo(string& info, double x, double y); // Info pour position X,Y
     35
    3136  virtual void UpdateLimits();
    3237  virtual void DrawStats(PIGraphicUC* g);
Note: See TracChangeset for help on using the changeset viewer.