Changeset 1916 in Sophya for trunk/SophyaPI


Ignore:
Timestamp:
Mar 6, 2002, 1:57:46 PM (24 years ago)
Author:
ansari
Message:

suite implementation DecodeOptionString - correction piaxestools , Reza 06/03/2002

Location:
trunk/SophyaPI/PI
Files:
5 edited

Legend:

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

    r1910 r1916  
    8585spy = bsy/4;
    8686
    87 int wszx = 6*spx+4.*bsx;
     87int wszx = 6*spx+3.5*bsx;
    8888int wszy = 7*bsy+9*spy;
    8989SetSize(wszx, wszy);
     
    100100
    101101cpy = spy*2;
    102 cpx += spx+1.25*bsx;
     102cpx += 2*spx+1.25*bsx;
    103103mText[0] = new PIText(this, "x_min_max", 2.25*bsx, bsy, cpx, cpy);
    104104mText[0]->SetText("-1.0  1.0");
     
    130130cpx = spx+0.25*bsx;
    131131mBut[0] = new PIButton(this, "GetAxesInfo", 2100, bsx*1.5, bsy, cpx, cpy);
    132 cpx += bsx*1.5+3*spx;
     132cpx += bsx*1.5+4*spx;
    133133mBut[1] = new PIButton(this, "AutoLimits", 2200, bsx*1.5, bsy, cpx, cpy);
    134134mBut[0]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic);
     
    138138cpx = spx+0.25*bsx;
    139139mBut[2] = new PIButton(this, "SetAxes", 2500, bsx*1.5, bsy, cpx, cpy);
    140 cpx += bsx*1.5+3*spx;
     140cpx += bsx*1.5+4*spx;
    141141mBut[3] = new PIButton(this, "Dismiss", 2777, bsx*1.5, bsy, cpx, cpy);
    142142mBut[2]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic);
     
    151151mBut[5]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic);
    152152 cpx += spx+0.5*bsx;
    153 mOpt = new PIOptMenu(this,"choix-action",2.*bsx,bsy,cpx,cpy);
     153mOpt = new PIOptMenu(this,"choix-action",1.5*bsx,bsy,cpx,cpy);
    154154mOpt->AppendItem("Transl X",2850);  // mTypAction=0
    155155mOpt->AppendItem("Transl Y",2851);  // mTypAction=1
     
    159159mOpt->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic);
    160160 string sdum="Transl X"; mOpt->SetValueStr(sdum); mTypAction=0;
    161  cpx += spx+2.*bsx;
     161 cpx += spx+1.5*bsx;
    162162mBut[6] = new PIButton(this,">",2803,0.5*bsx,bsy,cpx,cpy);
    163163mBut[6]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic);
  • trunk/SophyaPI/PI/pidrawer.cc

    r1904 r1916  
    286286PIDrawer::DecodeOptionString(vector<string> & opt, bool rmdecop)
    287287{
    288   // a faire un jour OP+Reza 30/11/01
    289   return(0);
     288  if (opt.size() == 0)  return(0); 
     289  PIGraphicAtt gratt;
     290  int ndec = gratt.DecodeAttStrings(opt, rmdecop);
     291  UpdateGraphicAtt(gratt);
     292  return(ndec);
    290293}
    291294
  • trunk/SophyaPI/PI/pieldrw.cc

    r1914 r1916  
    7676int PIElDrawer::DecodeOptionString(vector<string> & opt, bool rmdecopt)
    7777{
    78   // AFAIRE Reza 01/03/2002
    79   return(0);
     78  if (opt.size() == 0)  return(0); 
     79  int ndec1 = PIDrawer::DecodeOptionString(opt, rmdecopt);
     80  vector<string> udopt;
     81  unsigned int k = 0;
     82  int ndec = opt.size();
     83  for( k=0; k<opt.size(); k++ ) {
     84    string opts = opt[k];
     85    if ( (opts == "stdaxes") || (opts == "defaxes") || (opts == "boxaxes") ) {
     86      SetAxesFlags(kBoxAxes | kExtTicks | kLabels);
     87      continue;
     88    }
     89    if (opts == "simpleaxes") {
     90      SetAxesFlags(kAxesDflt);
     91      continue;     
     92    }
     93    if (opts == "boxaxesgrid") {
     94      SetAxesFlags(kBoxAxes | kExtTicks | kLabels | kGridOn);
     95      continue;     
     96    }
     97    if (opts == "fineaxes") {
     98      SetAxesFlags(kBoxAxes | kTicks | kLabels | kMinTicks | kMajTicks);
     99      continue;     
     100    }
     101    if ((opts == "grid") || (opts == "fineaxesgrid")) {
     102      SetAxesFlags(kBoxAxes | kTicks | kLabels | kMinTicks | kMajTicks | kGridOn);
     103      continue;     
     104    }
     105    if (opts == "axelabelautofontsize") {
     106      SetAxesAutoFontSize(true);
     107      continue;     
     108    }
     109    if (opts == "axelabelfixedfontsize") {
     110      SetAxesAutoFontSize(false);
     111      continue;     
     112    }
     113
     114    ndec--;
     115    if (rmdecopt)  udopt.push_back(opts);
     116  } 
     117
     118  if (rmdecopt)  opt = udopt;
     119  return(ndec+ndec1);
    80120}
    81121
  • trunk/SophyaPI/PI/piimage.cc

    r1914 r1916  
    506506int PIImage::DecodeOptionString(vector<string> & opt, bool rmdecopt)
    507507{
    508   // AFAIRE - Reza 01/03/2002
    509   return(0);
     508  vector<string> udopt;
     509  unsigned int k = 0;
     510  int ndec = opt.size();
     511  for( k=0; k<opt.size(); k++ ) {
     512    string opts = opt[k];
     513    // Facteur de zoom
     514    if (opts.substr(0,5) == "zoomx") {
     515      int zf = atoi(opts.substr(5).c_str());
     516      SetZoom(zf, false);
     517      continue;
     518    }
     519    if (opts.substr(0,5) == "zoom/") {
     520      int zf = -atoi(opts.substr(5).c_str());
     521      SetZoom(zf, false);
     522      continue;
     523    }
     524    // Table de couleur
     525    bool fgcmap = false;
     526    for(int kcc=0; kcc<PIColorMap::NumberStandardColorMaps(); kcc++) {
     527      if (opts == PIColorMap::GetStandardColorMapName(kcc)) {
     528        SetColMapId(PIColorMap::GetStandardColorMapId(kcc), false);
     529        fgcmap = true;
     530        break;
     531      }
     532    }
     533    if (fgcmap) continue;
     534
     535    // Position du centre d'image
     536    if (opts.substr(0,12) == "imagecenter=") {
     537      int xc,yc;
     538      sscanf(opts.substr(12).c_str(),"%d,%d",&xc, &yc);
     539      SetPave(xc, yc, false, true);
     540      continue;
     541    }
     542    ndec--;
     543    if (rmdecopt)  udopt.push_back(opts);
     544  }
     545
     546  if (rmdecopt)  opt = udopt;
     547  return(ndec);
    510548}
    511549
  • trunk/SophyaPI/PI/piversion.h

    r1887 r1916  
    22#define PIVERSION_H_SEEN
    33
    4 #define PI_VERSIONNUMBER  3.44
     4#define PI_VERSIONNUMBER  3.60
    55
    66#endif
Note: See TracChangeset for help on using the changeset viewer.