Changeset 3942 in Sophya for trunk/SophyaPI


Ignore:
Timestamp:
Jan 29, 2011, 9:35:55 PM (15 years ago)
Author:
cmv
Message:

pour eviter bug si on ecrit imagecenter=67.5,1881.5 (pas entier), cmv 29/01/2011

File:
1 edited

Legend:

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

    r3734 r3942  
    601601    // Position du centre d'image
    602602    if (opts.substr(0,12) == "imagecenter=") {
    603       int xc = XPave(); 
    604       int yc = YPave();
     603      /* Si on ecrit "imagecenter=34.5,55.5" ca ne marche pas CMV 29/01/2011
     604      int xc = XPave(), yc = YPave();
    605605      sscanf(opts.substr(12).c_str(),"%d,%d",&xc, &yc);
     606      SetPave(xc, yc, false, true);
     607      */
     608      int xc = XPave(), yc = YPave();
     609      double ddxc = xc, ddyc = yc;
     610      sscanf(opts.substr(12).c_str(),"%lf,%lf",&ddxc, &ddyc);
     611      xc = int(ddxc+0.00001); yc = int(ddyc+0.00001);
    606612      SetPave(xc, yc, false, true);
    607613      continue;
Note: See TracChangeset for help on using the changeset viewer.