Changeset 2518 for trunk/MagicSoft/Cosy/gui/MGAccuracy.cc
- Timestamp:
- 11/17/03 13:50:48 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Cosy/gui/MGAccuracy.cc
r2278 r2518 149 149 } 150 150 151 void MGAccuracy::InitBar() 152 { 153 fBar = new TLine(0, 0, 0, 0); 154 fBar->SetLineColor(kBlack); 155 fBar->SetLineStyle(1); 156 fBar->SetLineWidth(5); 157 fBar->Draw(); 158 159 fList->Add(fBar); 160 } 161 151 162 void MGAccuracy::InitCross() 152 163 { … … 176 187 InitText(); 177 188 InitCross(); 189 InitBar(); 178 190 179 191 InitCanvas(); … … 215 227 double dist = acos(d); 216 228 217 dist *= 3600./d2r; 229 dist *= 3600./d2r; // [min] 218 230 219 231 int rs = (int)floor(fmod(dist, 60.)); 232 220 233 dist /= 60.; 221 234 int rm = (int)dist;//floor(fmod(dist, 60.)); … … 225 238 226 239 fTxt->SetText(fTxt->GetX(), fTxt->GetY(), txt); 240 241 fBar->SetX2(dist*60); 242 if (dist*16384<1*360*60) 243 fBar->SetLineColor(kGreen); 244 else 245 if (dist*16384<2*360*60) 246 fBar->SetLineColor(kYellow); 247 else 248 fBar->SetLineColor(kRed); 227 249 } 228 250
Note:
See TracChangeset
for help on using the changeset viewer.