Changeset 5850 for trunk/Ohana/src/opihi/cmd.data/section.c
- Timestamp:
- Dec 27, 2005, 3:21:40 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/cmd.data/section.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/cmd.data/section.c
r4689 r5850 6 6 int Ngraph, Xgraph; 7 7 Graphdata graphmode; 8 KapaSection section; 8 9 9 10 List = FALSE; … … 21 22 if (!GetGraph (&graphmode, &Xgraph, &Ngraph)) return (FALSE); 22 23 24 /* list sections */ 23 25 if (argc == 1) { 24 /* list section */ 25 SendGraphCommand (Xgraph, 4, "LSEC"); 26 SendGraphMessage (Xgraph, "* %s", argv[1]); 26 KapaGetSection (Xgraph, "*"); 27 27 fprintf (stderr, "USAGE: section name [x y dx dy]\n"); 28 28 return (TRUE); … … 30 30 31 31 if (argc == 2) { 32 /* se tsection */32 /* select / show section */ 33 33 if (List) { 34 SendGraphCommand (Xgraph, 4, "LSEC");34 KapaGetSection (Xgraph, argv[1]); 35 35 } else { 36 SendGraphCommand (Xgraph, 4, "SSEC");36 KapaSelectSection (Xgraph, argv[1]); 37 37 } 38 SendGraphMessage (Xgraph, "%s", argv[1]);39 38 return (TRUE); 40 39 } 41 40 42 41 if (argc == 6) { 43 /* define section */ 44 SendGraphCommand (Xgraph, 4, "DSEC"); 45 SendGraphMessage (Xgraph, "%s %6.3f %6.3f %6.3f %6.3f", argv[1], atof (argv[2]), atof (argv[3]), atof (argv[4]), atof (argv[5])); 42 /* set section */ 43 section.name = argv[1]; 44 section.x = atof (argv[2]); 45 section.y = atof (argv[3]); 46 section.dx = atof (argv[4]); 47 section.dy = atof (argv[5]); 48 KapaSetSection (Xgraph, §ion); 46 49 return (TRUE); 47 50 } … … 50 53 } 51 54 52 /* should do some range checking on x y dx dy53 should be between 0.0 and 1.0, precision of 0.00154 is sufficient55 */55 /* should do some range checking on x y dx dy 56 should be between 0.0 and 1.0, precision of 0.001 57 is sufficient 58 */
Note:
See TracChangeset
for help on using the changeset viewer.
