Changeset 349 in Sophya for trunk/SophyaPI/PIext/basexecut.cc


Ignore:
Timestamp:
Aug 4, 1999, 3:37:31 PM (26 years ago)
Author:
ercodmgr
Message:

A/ ajout des blocs foreach et ameliorations gestion des variables ($x)
pour l'interpreteur piacmd.
B/ Ajout PIStdImgApp::AddText et corrections diverses

Reza 05/08/99

File:
1 edited

Legend:

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

    r345 r349  
    7777  mImgApp->SetXYLimits(xmin, xmax, ymin, ymax);
    7878  }
     79else if (kw == "addtext") {
     80  if (tokens.size() < 4) { cout << "Usage: addtext x y colfontatt txt" << endl;  return(0); }
     81  double xp = atof(tokens[0].c_str());
     82  double yp = atof(tokens[1].c_str());
     83  bool fgsr = true;
     84  string txt = tokens[3];
     85  for(int k=4; k<tokens.size(); k++) txt += (' ' + tokens[k]);
     86  int opt = mObjMgr->GetServiceObj()->DecodeDispOption(tokens[2], fgsr);
     87  mImgApp->AddText(txt, xp, yp);
     88  if (fgsr) mImgApp->RestoreGraphicAtt();
     89  }
     90 
    7991// >>>>>>>>>>> Link dynamique de fonctions C++
    8092else if (kw == "link" ) {
     
    609621kw = "setxylimits";
    610622usage = "Define 2-D plot limits \n Usage: setxylimits xmin xmax ymin ymax";
     623usage += "\n  Related commands: gratt"; 
     624mpiac->RegisterCommand(kw, usage, this, "Graphics");
     625
     626kw = "addtext";
     627usage = "Adds a text string to the current graphic object";
     628usage += "\n at the specified position (Gr-Object Coordinate) with graphic attribute specification";
     629usage += "\n  Usage: addtext x y ColFontAtt TextString";
    611630usage += "\n  Related commands: gratt"; 
    612631mpiac->RegisterCommand(kw, usage, this, "Graphics");
Note: See TracChangeset for help on using the changeset viewer.