Changeset 2638 in Sophya for trunk/SophyaPI/PIext/basexecut.cc
- Timestamp:
- Nov 19, 2004, 6:41:07 PM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PIext/basexecut.cc
r2615 r2638 164 164 } 165 165 else if ((kw == "addline") || (kw == "addrect") || (kw == "addfrect") || 166 (kw == "addoval") || (kw == "addfoval") || 166 167 (kw == "addarrow") ) { 167 168 if (tokens.size() < 4) { 168 cout << "Usage: addline/addrect/addfrect x1 y1 x2 y2 [colatt] [fgnc]" << endl; 169 if ( (kw == "addoval") || (kw == "addfoval") ) 170 cout << "Usage addoval/addfoval/addarrow xc yc dx dy [colatt] [fgnc]" << endl; 171 else 172 cout << "Usage: addline/addrect/addfrect/addarrow x1 y1 x2 y2 [colatt] [fgnc]" << endl; 169 173 return(0); 170 174 } … … 178 182 if (kw == "addline") mImgApp->AddLine(xp1, yp1, xp2, yp2, sop, false, fgnc); 179 183 else if (kw == "addarrow") mImgApp->AddLine(xp1, yp1, xp2, yp2, sop, true, fgnc); 180 else { 181 bool fgfill = (kw == "addrect") ? false : true; 182 mImgApp->AddRectangle(xp1, yp1, xp2, yp2, sop, fgfill, fgnc); 184 else { 185 bool fgfill = ((kw == "addrect") || (kw == "addoval")) ? false : true; 186 if ( (kw == "addrect") || (kw == "addfrect") ) 187 mImgApp->AddRectangle(xp1, yp1, xp2, yp2, sop, fgfill, fgnc); 188 else mImgApp->AddOval(xp1, yp1, xp2, yp2, sop, fgfill, fgnc); 183 189 } 184 190 } … … 1339 1345 usage += "\n Related commands: addtext addline addarrow addfrect addfrect"; 1340 1346 usage += "\n addcirc addarc addfarc addpoly addfpoly graphicatt"; 1347 mpiac->RegisterCommand(kw, usage, this, "Graphic-Elts"); 1348 1349 kw = "addoval"; 1350 usage = "Adds an oval (ellipse) to the current graphic object"; 1351 usage += "\n centered on xc,yc - semi-axis ds,dy (+ graphic attribute)"; 1352 usage += "\n The Base/AxesDrawer is used to handle added rectangle"; 1353 usage += "\n Alt<E> to remove added element"; 1354 usage += "\n Usage: addoval xc yc dx dy [GraphicAtt] [fgnc=false/true]"; 1355 usage += "\n if fgnc==true : Normalized 0..1 coordinates specification (def=false)"; 1356 usage += "\n Related commands: addfoval addline addarrow addfrect addcirc addfcirc"; 1357 usage += "\n addcirc addfcirc addarc addfarc addpoly addfpoly graphicatt"; 1358 mpiac->RegisterCommand(kw, usage, this, "Graphic-Elts"); 1359 1360 kw = "addfoval"; 1361 usage = "Adds a filled oval (ellipse) to the current graphic object"; 1362 usage += "\n centered on xc,yc - semi-axis ds,dy (+ graphic attribute)"; 1363 usage += "\n The Base/AxesDrawer is used to handle added rectangle"; 1364 usage += "\n Alt<E> to remove added element"; 1365 usage += "\n Usage: addfoval xc yc dx dy [GraphicAtt] [fgnc=false/true]"; 1366 usage += "\n if fgnc==true : Normalized 0..1 coordinates specification (def=false)"; 1367 usage += "\n Related commands: addoval addline addarrow addfrect addcirc addfcirc"; 1368 usage += "\n addcirc addfcirc addarc addfarc addpoly addfpoly graphicatt"; 1341 1369 mpiac->RegisterCommand(kw, usage, this, "Graphic-Elts"); 1342 1370
Note:
See TracChangeset
for help on using the changeset viewer.