Changeset 3480 in Sophya


Ignore:
Timestamp:
Apr 4, 2008, 10:18:40 PM (17 years ago)
Author:
ansari
Message:

Ajout decodage options revax/revay/axelr/axerl/axeud/axedu a PIScDrawWdg - Reza 04/04/2008

File:
1 edited

Legend:

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

    r3306 r3480  
    248248  bool fglogy = isLogScaleY();
    249249
     250  // Flag declenchant SetLimits
     251  bool fgsaxel = false;
     252  // Limites et sens d'axe
     253  double xmin = XMin();
     254  double ymin = YMin();
     255  double xmax = XMax();
     256  double ymax = YMax();
     257  int axrl = kAxeDirLtoR;
     258  int ayud = kAxeDirDownUp;
     259  int xac, yac;
     260  GetAxesConfig(xac, yac);
     261  if (xac & kAxeDirRtoL) axrl = kAxeDirRtoL;
     262  if (yac & kAxeDirUpDown) ayud = kAxeDirUpDown;
     263
    250264  for( k=0; k<opt.size(); k++ ) {
    251265    string opts = opt[k];
     
    259273    // Limites en x,y
    260274    if (opts.substr(0,9) == "xylimits=") {
    261       double xmin = XMin();
    262       double ymin = YMin();
    263       double xmax = XMax();
    264       double ymax = YMax();
    265275      sscanf(opts.substr(9).c_str(),"%lg,%lg,%lg,%lg",&xmin, &xmax,&ymin,&ymax);
    266       SetLimits(xmin, xmax, ymin, ymax);
     276      fgsaxel = true;
    267277      continue;
    268278    }
     
    292302      continue;
    293303    }
    294 
    295 // Les attributs d'axes (stdaxes boxaxesgrid ...) sont decodes par PIElDrawer
     304    if ((opts == "revax") || (opts == "axerl") ) {
     305      fgsaxel = true;  axrl = kAxeDirRtoL;
     306      continue;
     307    }
     308    if ((opts == "revay") || (opts == "axeud") ) {
     309      fgsaxel = true;  ayud = kAxeDirUpDown;
     310      continue;
     311    }
     312    if (opts == "axelr") {
     313      fgsaxel = true;  axrl = kAxeDirLtoR;
     314      continue;
     315    }
     316    if (opts == "axedu") {
     317      fgsaxel = true;  ayud = kAxeDirDownUp;
     318      continue;
     319    }
     320
     321// Les autres attributs d'axes (stdaxes boxaxesgrid ...) sont decodes par PIElDrawer
    296322
    297323    ndec--;
     
    299325  } 
    300326
     327  if (fgsaxel)  SetLimits(xmin, xmax, ymin, ymax, axrl, ayud);
    301328  if (fglinlog) SetLogScale(fglogx, fglogy);
    302329
Note: See TracChangeset for help on using the changeset viewer.