Changeset 2383 in Sophya for trunk/SophyaPI/PIext/pihisto2d.cc


Ignore:
Timestamp:
May 16, 2003, 5:15:55 PM (22 years ago)
Author:
ansari
Message:

Ajout methode GetInfoString() aux ObjAdapter + attributs de gestion de position de stat pour PINtuple/PIHisto + positionnement par defaut de stat (statposoff=) lors de disp same - Reza 16/5/2003

File:
1 edited

Legend:

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

    r2380 r2383  
    4242UseFrac();
    4343SetStats();
     44 SetStatPosOffset();
    4445SetName("Histo2DDrw");
    4546// PIHisto2D has specific control tools
     
    427428  double cellWidth =  1.1 * (double)g->CalcStringWidth(label);
    428429
     430  double ofpx = spoX*(XMax()-XMin());
     431  double ofpy = spoY*(YMax()-YMin());
     432
    429433  double xu, yu, cw;
    430434  // Les limites du cadre
    431435  xu = g->DeltaUCX(XMax(), -cellWidth);
    432436  yu = g->DeltaUCY(YMax(), -cellHeight);
    433   g->DrawLine(xu,YMax(),xu,yu);
    434   g->DrawLine(xu,yu,XMax(),yu);
     437  double recw = XMax()-xu;
     438  double rech = YMax()-yu;
     439  xu += ofpx;  yu += ofpy;
     440  g->DrawBox(xu, yu, recw, rech);
    435441
    436442  // L'ecriture des labels
     
    439445  cw = (g->isAxeYDirUpDown()) ? -0.1*cH : -1.1*cH;
    440446  yu = g->DeltaUCY(YMax(),cw);
     447  xu += ofpx;  yu += ofpy;
    441448  g->DrawString(xu,yu,label);
    442449
     
    524531             || opts=="nostat" || opts=="nostats") {
    525532      SetStats(false);
     533    } else  if(opts.substr(0,11) == "statposoff=") {
     534      float xo=0., yo=0.;
     535      sscanf(opts.substr(11).c_str(),"%g,%g",&xo, &yo);
     536      SetStatPosOffset(xo, yo);
    526537    } else if(opts.substr(0,8)=="h2scale=") {
    527538      unsigned short t=TypScale(); float ls=LogScale();
Note: See TracChangeset for help on using the changeset viewer.