Changeset 1549 in Sophya for trunk/SophyaPI/PI/piimage.cc


Ignore:
Timestamp:
Jun 27, 2001, 10:11:31 AM (24 years ago)
Author:
ansari
Message:

Introduction de la possibilite d'afficher des informations complementaires en fonction de la position souris ds PIImage - (Extension de l'interface P2DArrayAdapter) - Reza 27/6/2001

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaPI/PI/piimage.cc

    r1503 r1549  
    310310showinfo = si;
    311311if (showinfo && img)  {
    312   char buff[256];
    313   double x,y;
    314   img->Coord(xpav, ypav, x, y);
    315   sprintf(buff," X= %g , Y= %g  Pix= %g (%d,%d)      ",
    316           x, y , (*img)(xpav, ypav), xpav, ypav );
    317   DrawInfo(mWGrC, buff);
     312  char * ibuff = img->InfoString(xpav, ypav);
     313  DrawInfo(mWGrC, ibuff);
    318314  }
    319315else DrawInfo(mWGrC, NULL);
     
    572568  }
    573569else {
    574   char buff[256];
    575   double x,y;
    576   img->Coord(xpav, ypav, x, y);
    577   sprintf(buff," X= %g , Y= %g  Pix= %g (%d,%d)      ",
    578           x, y , (*img)(xpav, ypav), xpav, ypav );
    579   if (ustrtw || atrtw)  trtlb->SetLabel((string)buff);
    580   else DrawInfo(mWGrC, buff);
     570  char * ibuff = img->InfoString(xpav, ypav);
     571  if (ustrtw || atrtw)  trtlb->SetLabel((string)ibuff);
     572  else DrawInfo(mWGrC, ibuff);
    581573  }
    582574if (zow != NULL)   ComputeZoomPixmap();
     
    616608
    617609if (showinfo && img) {
    618   char buff[256];
    619   double x,y;
    620   img->Coord(xpav, ypav, x, y);
    621   sprintf(buff," X= %g , Y= %g  Pix= %g (%d,%d)      ",
    622         x, y , (*img)(xpav, ypav), xpav, ypav );
    623   DrawInfo(mWGrC, buff);
     610  char * ibuff = img->InfoString(xpav, ypav);
     611  DrawInfo(mWGrC, ibuff);
    624612  }
    625613
     
    773761
    774762 {
    775  char buff[256]; 
    776  double x,y;
    777  img->Coord(xp, yp, x, y);
    778  sprintf(buff," X= %g , Y= %g  Pix= %g  (C= %d,%d)   ",
    779          x, y , (*img)(xp, yp),  (xp+xpv0)/2, (yp+ypv0)/2 );
    780  if (ustrtw || atrtw) trtlb->SetLabel((string)buff);
    781  else DrawInfo(mWGrC, buff);
     763  char * ibuff = img->InfoString((xp+xpv0)/2, (yp+ypv0)/2 );
     764 if (ustrtw || atrtw) trtlb->SetLabel((string)ibuff);
     765 else DrawInfo(mWGrC, ibuff);
    782766 }
    783767
Note: See TracChangeset for help on using the changeset viewer.