Changeset 7789
- Timestamp:
- 07/14/06 01:46:24 (18 years ago)
- Location:
- trunk/MagicSoft
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Cosy/stargleds.txt
r7614 r7789 1 125 148.9 0 02 217.37 284.03 0 03 141.9 429.3 0 04 192 201 0 05 1 68 127 0 0 2 127 142 0 0 3 189 199 0 0 4 217 279 0 0 5 144 423 0 0 -
trunk/MagicSoft/Mars/Changelog
r7786 r7789 18 18 19 19 -*-*- END OF LINE -*-*- 20 2006/07/13 Thomas Bretz 21 22 * mastro/MAstroCatalog.h: 23 - implemented new member function GetNumStars 24 25 * mbase/MGMap.[h,cc]: 26 - implemented new member function DrawHexagon 27 28 20 29 21 30 2006/07/11 Thomas Bretz -
trunk/MagicSoft/Mars/mastro/MAstroCatalog.h
r7491 r7789 151 151 // Interface to get stars 152 152 TList *GetList() { return &fList; } // Return list of stars 153 UInt_t GetNumStars() const { return fList.GetEntries(); } 153 154 154 155 // TObject -
trunk/MagicSoft/Mars/mbase/MGMap.cc
r4748 r7789 274 274 // -------------------------------------------------------------------------- 275 275 // 276 // Draw a hexagon into the buffer (size w*h) around (x, y) with radius r and 277 // the color col. 278 // 279 void MGMap::DrawHexagon(UChar_t *buf, int w, int h, Float_t px, Float_t py, Float_t d, UChar_t col, Int_t style) 280 { 281 const Int_t np = 6; 282 283 const Double_t dy[np+1] = { .5 , 0. , -.5 , -.5 , 0. , .5 , .5 }; 284 const Double_t dx[np+1] = { .2886, .5772, .2886, -.2886, -.5772, -.2886, .2886 }; 285 286 // 287 // calculate the positions of the pixel corners 288 // 289 Double_t x[np+1], y[np+1]; 290 for (Int_t i=0; i<np+1; i++) 291 { 292 x[i] = px + dx[i]*d; 293 y[i] = py + dy[i]*d; 294 } 295 296 for (int i=0; i<6; i++) 297 DrawLine(buf, w, h, x[i], y[i], x[i+1], y[i+1], col, style); 298 } 299 300 // -------------------------------------------------------------------------- 301 // 276 302 // Draw a circle into the buffer (size w*h) around (x, y) with radius r and 277 303 // the color col. -
trunk/MagicSoft/Mars/mbase/MGMap.h
r5143 r7789 52 52 static UChar_t Color(int col); 53 53 static void DrawCircle(UChar_t *buf, int w, int h, Float_t x, Float_t y, Float_t r, UChar_t col); 54 static void DrawHexagon(UChar_t *buf, int w, int h, Float_t x, Float_t y, Float_t r, UChar_t col, Int_t style=1); 54 55 static void DrawLine(UChar_t *buf, int w, int h, Float_t x1, Float_t y1, Float_t x2, Float_t y2, UChar_t col, Int_t style=1); 55 56 static void DrawBox(UChar_t *buf, int w, int h, Float_t x1, Float_t y1, Float_t x2, Float_t y2, UChar_t col, Int_t style=1);
Note:
See TracChangeset
for help on using the changeset viewer.