Changeset 2265 in Sophya for trunk/SophyaPI/PIext/basexecut.cc
- Timestamp:
- Nov 15, 2002, 12:58:41 AM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PIext/basexecut.cc
r2263 r2265 117 117 double ymax = atof(tokens[3].c_str()); 118 118 char buff[128]; 119 sprintf(buff, "axesnone xylimits=%g,%g,%g,%g ", xmin, xmax, ymin, ymax);119 sprintf(buff, "axesnone xylimits=%g,%g,%g,%g ", xmin, xmax, ymin, ymax); 120 120 string sop = buff; 121 121 if (tokens.size() > 4) sop += tokens[4]; 122 122 string name; 123 if (tokens.size() > 5) sop += tokens[5];123 if (tokens.size() > 5) name = tokens[5]; 124 124 PIFuncDrawer* gdr = new PIFuncDrawer(NULL); 125 125 mImgApp->DispScDrawer(gdr, name, sop); … … 185 185 bool fgfill = (kw == "addcirc") ? false : true; 186 186 mImgApp->AddCircle(xc, yc, rad, sop, fgfill, fgnc); 187 } 188 else if ((kw == "addarca") || (kw == "addfarca")) { 189 if (tokens.size() < 5) { 190 cout << "Usage: addarca/addfarca xc yc r a da [colatt] [fgnc]" << endl; 191 return(0); 192 } 193 double xc = atof(tokens[0].c_str()); 194 double yc = atof(tokens[1].c_str()); 195 double rad = atof(tokens[2].c_str()); 196 double ang = atof(tokens[3].c_str()); 197 double dang = atof(tokens[4].c_str()); 198 string sop; 199 if (tokens.size() > 5) sop = tokens[5]; 200 bool fgnc = _CkBoolNC_(6); 201 bool fgfill = (kw == "addarca") ? false : true; 202 mImgApp->AddArc(xc, yc, rad, ang, dang, sop, fgfill, fgnc); 187 203 } 188 204 else if (kw == "addmarker") { … … 1001 1017 usage += "\n at the specified position (+ color/font/pos/dir attributes) "; 1002 1018 usage += "\n The Base/AxesDrawer is used to handle added text strings" ; 1003 usage += "\n Alt< Z> to remove added elements";1019 usage += "\n Alt<E> to remove the added element"; 1004 1020 usage += "\n Usage: addtext x y TextString [ColFontPosAtt] [fgnc=false/true]"; 1005 1021 usage += "\n (use quotes '' for multi word text strings) "; … … 1011 1027 usage += "\n Related commands: addctext addline addarrow addrect addfrect"; 1012 1028 usage += "\n addcirc addfcirc addarc addfrac addpoly addfpoly settitle graphicatt"; 1013 mpiac->RegisterCommand(kw, usage, this, "Graphic s");1029 mpiac->RegisterCommand(kw, usage, this, "Graphic-Elts"); 1014 1030 1015 1031 kw = "addctext"; … … 1020 1036 usage += "\n Related commands: addtext addline addrect ..."; 1021 1037 usage += "\n (See command addtext and graphicatt for more details)"; 1022 mpiac->RegisterCommand(kw, usage, this, "Graphic s");1038 mpiac->RegisterCommand(kw, usage, this, "Graphic-Elts"); 1023 1039 1024 1040 kw = "addline"; … … 1026 1042 usage += "\n at the specified position (+ graphic attribute)"; 1027 1043 usage += "\n The Base/AxesDrawer is used to handle added lines"; 1028 usage += "\n Alt< Z> to remove added elements";1044 usage += "\n Alt<E> to remove the added element"; 1029 1045 usage += "\n Usage: addline x1 y1 x2 y2 [GraphicAtt] [fgnc=false/true]"; 1030 1046 usage += "\n if fgnc==true : Normalized 0..1 coordinates specification (def=false)"; 1031 1047 usage += "\n Related commands: addarrow addtext addrect addfrect "; 1032 1048 usage += "\n addmarker addcirc addfcirc addarc addfarc addpoly addfpoly graphicatt"; 1033 mpiac->RegisterCommand(kw, usage, this, "Graphic s");1049 mpiac->RegisterCommand(kw, usage, this, "Graphic-Elts"); 1034 1050 1035 1051 kw = "addarrow"; … … 1037 1053 usage += "\n at the specified position (+ graphic attribute)"; 1038 1054 usage += "\n The Base/AxesDrawer is used to handle added lines"; 1039 usage += "\n Alt< Z> to remove added elements";1055 usage += "\n Alt<E> to remove the added element"; 1040 1056 usage += "\n Usage: addarrow x1 y1 x2 y2 [GraphicAtt] [fgnc=false/true]"; 1041 1057 usage += "\n if fgnc==true : Normalized 0..1 coordinates specification (def=false)"; 1042 1058 usage += "\n Related commands: addline addtext addrect addfrect "; 1043 1059 usage += "\n addmarker addcirc addfcirc addarc addfarc addpoly addfpoly graphicatt"; 1044 mpiac->RegisterCommand(kw, usage, this, "Graphic s");1060 mpiac->RegisterCommand(kw, usage, this, "Graphic-Elts"); 1045 1061 kw = "addarrow_nc"; 1046 1062 … … 1049 1065 usage += "\n between the specified positions (+ graphic attribute)"; 1050 1066 usage += "\n The Base/AxesDrawer is used to handle added rectangle"; 1051 usage += "\n Alt< Z> to remove added elements";1067 usage += "\n Alt<E> to remove added element"; 1052 1068 usage += "\n Usage: addrect x1 y1 x2 y2 [GraphicAtt] [fgnc=false/true]"; 1053 1069 usage += "\n if fgnc==true : Normalized 0..1 coordinates specification (def=false)"; 1054 1070 usage += "\n Related commands: addtext addline addarrow addfrect"; 1055 1071 usage += "\n addcirc addfcirc addarc addfarc addpoly addfpoly graphicatt"; 1056 mpiac->RegisterCommand(kw, usage, this, "Graphic s");1072 mpiac->RegisterCommand(kw, usage, this, "Graphic-Elts"); 1057 1073 1058 1074 kw = "addfrect"; … … 1060 1076 usage += "\n between the specified positions (+ graphic attribute)"; 1061 1077 usage += "\n The Base/AxesDrawer is used to handle added rectangle"; 1062 usage += "\n Alt< Z> to remove added elements";1078 usage += "\n Alt<E> to remove added element"; 1063 1079 usage += "\n Usage: addfrect x1 y1 x2 y2 [GraphicAtt] [fgnc=false/true]"; 1064 1080 usage += "\n if fgnc==true : Normalized 0..1 coordinates specification (def=false)"; 1065 1081 usage += "\n Related commands: addtext addline addarrow addrect"; 1066 1082 usage += "\n addcirc addfcirc addpoly addfpoly graphicatt"; 1067 mpiac->RegisterCommand(kw, usage, this, "Graphic s");1083 mpiac->RegisterCommand(kw, usage, this, "Graphic-Elts"); 1068 1084 1069 1085 kw = "addmarker"; … … 1071 1087 usage += "\n at the specified position (+ graphic attribute)"; 1072 1088 usage += "\n The Base/AxesDrawer is used to handle added circles"; 1073 usage += "\n Alt< Z> to remove added elements";1089 usage += "\n Alt<E> to remove added element"; 1074 1090 usage += "\n Usage: addmarker xpos ypos [GraphicAtt] [fgnc=false/true]"; 1075 1091 usage += "\n if fgnc==true : Normalized 0..1 coordinates specification (def=false)"; 1076 1092 usage += "\n Related commands: addtext addline addarrow addfrect addfrect"; 1077 1093 usage += "\n addcirc addfcirc addarc addfarc addpoly addfpoly graphicatt"; 1078 mpiac->RegisterCommand(kw, usage, this, "Graphic s");1094 mpiac->RegisterCommand(kw, usage, this, "Graphic-Elts"); 1079 1095 1080 1096 kw = "addcirc"; … … 1082 1098 usage += "\n with the specified center and radius (+ graphic attribute)"; 1083 1099 usage += "\n The Base/AxesDrawer is used to handle added circles"; 1084 usage += "\n Alt< Z> to remove added elements";1100 usage += "\n Alt<E> to remove added element"; 1085 1101 usage += "\n Usage: addcirc xcenter ycenter radius [GraphicAtt] [fgnc=false/true]"; 1086 1102 usage += "\n if fgnc==true : Normalized 0..1 coordinates specification (def=false)"; 1087 1103 usage += "\n Related commands: addtext addline addarrow addfrect addfrect"; 1088 1104 usage += "\n addfcirc addarc addfarc addpoly addfpoly graphicatt"; 1089 mpiac->RegisterCommand(kw, usage, this, "Graphic s");1105 mpiac->RegisterCommand(kw, usage, this, "Graphic-Elts"); 1090 1106 1091 1107 kw = "addfcirc"; … … 1093 1109 usage += "\n with the specified center and radius (+ graphic attribute)"; 1094 1110 usage += "\n The Base/AxesDrawer is used to handle added circles"; 1095 usage += "\n Alt< Z> to remove added elements";1111 usage += "\n Alt<E> to remove added element"; 1096 1112 usage += "\n Usage: addcirc xcenter ycenter radius [GraphicAtt] [fgnc=false/true]"; 1097 1113 usage += "\n if fgnc==true : Normalized 0..1 coordinates specification (def=false)"; 1098 1114 usage += "\n Related commands: addtext addline addarrow addfrect addfrect"; 1099 1115 usage += "\n addcirc addarc addfarc addpoly addfpoly graphicatt"; 1100 mpiac->RegisterCommand(kw, usage, this, "Graphics"); 1116 mpiac->RegisterCommand(kw, usage, this, "Graphic-Elts"); 1117 1118 kw = "addarca"; 1119 usage = "Adds an arc to the current graphic object"; 1120 usage += "\n defined by the circle (center+radius), start angle and angular extension"; 1121 usage += "\n Angles are specified in degrees"; 1122 usage += "\n Usage: addarca xc yc r a0deg dadeg [GraphicAtt] [fgnc=false/true]"; 1123 usage += "\n if fgnc==true : Normalized 0..1 coordinates specification (def=false)"; 1124 usage += "\n Related commands: addtext addline addfarca addarc ..."; 1125 mpiac->RegisterCommand(kw, usage, this, "Graphic-Elts"); 1126 1127 kw = "addfarca"; 1128 usage = "Adds a filled arc to the current graphic object"; 1129 usage += "\n defined by the circle (center+radius), start angle and angular extension"; 1130 usage += "\n Angles are specified in degrees"; 1131 usage += "\n Usage: addfarca xc yc r a0deg dadeg [GraphicAtt] [fgnc=false/true]"; 1132 usage += "\n if fgnc==true : Normalized 0..1 coordinates specification (def=false)"; 1133 usage += "\n Related commands: addtext addline addarca addarc ..."; 1134 mpiac->RegisterCommand(kw, usage, this, "Graphic-Elts"); 1101 1135 1102 1136 kw = "addarc"; … … 1104 1138 usage += "\n defined by 3 points (+ graphic attribute)"; 1105 1139 usage += "\n The Base/AxesDrawer is used to handle added arcs"; 1106 usage += "\n Alt<Z> to remove added elements"; 1140 usage += "\n Alt<E> to remove the added element"; 1141 usage += "\n Usage: addarc x1 y1 x2 y2 x3 y3 [GraphicAtt] [fgnc=false/true]"; 1142 usage += "\n if fgnc==true : Normalized 0..1 coordinates specification (def=false)"; 1143 usage += "\n Related commands: addtext addline addarrow addfrect addfrect"; 1144 usage += "\n addcirc addfcirc addfarc addarca addpoly addfpoly graphicatt"; 1145 mpiac->RegisterCommand(kw, usage, this, "Graphic-Elts"); 1146 1147 kw = "addfarc"; 1148 usage = "Adds a filled arc to the current graphic object"; 1149 usage += "\n defined by 3 points (+ graphic attribute)"; 1150 usage += "\n The Base/AxesDrawer is used to handle added arcs"; 1151 usage += "\n Alt<E> to remove added element"; 1107 1152 usage += "\n Usage: addarc x1 y1 x2 y2 x3 y3 [GraphicAtt] [fgnc=false/true]"; 1108 1153 usage += "\n if fgnc==true : Normalized 0..1 coordinates specification (def=false)"; 1109 1154 usage += "\n Related commands: addtext addline addarrow addfrect addfrect"; 1110 1155 usage += "\n addcirc addfcirc addfarc addpoly addfpoly graphicatt"; 1111 mpiac->RegisterCommand(kw, usage, this, "Graphics"); 1112 1113 kw = "addfarc"; 1114 usage = "Adds a filled arc to the current graphic object"; 1115 usage += "\n defined by 3 points (+ graphic attribute)"; 1116 usage += "\n The Base/AxesDrawer is used to handle added arcs"; 1117 usage += "\n Alt<Z> to remove added elements"; 1118 usage += "\n Usage: addarc x1 y1 x2 y2 x3 y3 [GraphicAtt] [fgnc=false/true]"; 1119 usage += "\n if fgnc==true : Normalized 0..1 coordinates specification (def=false)"; 1120 usage += "\n Related commands: addtext addline addarrow addfrect addfrect"; 1121 usage += "\n addcirc addfcirc addfarc addpoly addfpoly graphicatt"; 1122 mpiac->RegisterCommand(kw, usage, this, "Graphics"); 1156 mpiac->RegisterCommand(kw, usage, this, "Graphic-Elts"); 1123 1157 1124 1158 kw = "addpoly"; … … 1129 1163 usage += "\n Related commands: addtext addline addarrow addfrect addfrect"; 1130 1164 usage += "\n addcirc addfcirc addfarc graphicatt"; 1131 mpiac->RegisterCommand(kw, usage, this, "Graphic s");1165 mpiac->RegisterCommand(kw, usage, this, "Graphic-Elts"); 1132 1166 1133 1167 kw = "addfpoly"; … … 1138 1172 usage += "\n Related commands: addtext addline addarrow addfrect addfrect"; 1139 1173 usage += "\n addcirc addfcirc addfarc graphicatt"; 1140 mpiac->RegisterCommand(kw, usage, this, "Graphic s");1174 mpiac->RegisterCommand(kw, usage, this, "Graphic-Elts"); 1141 1175 1142 1176 kw = "settitle";
Note:
See TracChangeset
for help on using the changeset viewer.