Index: /trunk/MagicSoft/Cosy/stargleds.txt
===================================================================
--- /trunk/MagicSoft/Cosy/stargleds.txt	(revision 7788)
+++ /trunk/MagicSoft/Cosy/stargleds.txt	(revision 7789)
@@ -1,5 +1,5 @@
-125    148.9  0 0
-217.37 284.03 0 0
-141.9  429.3  0 0
-192    201    0 0 
 68     127    0 0
+127    142    0 0
+189    199    0 0 
+217    279    0 0
+144    423    0 0
Index: /trunk/MagicSoft/Mars/Changelog
===================================================================
--- /trunk/MagicSoft/Mars/Changelog	(revision 7788)
+++ /trunk/MagicSoft/Mars/Changelog	(revision 7789)
@@ -18,4 +18,13 @@
 
                                                  -*-*- END OF LINE -*-*-
+ 2006/07/13 Thomas Bretz
+
+   * mastro/MAstroCatalog.h:
+     - implemented new member function GetNumStars
+
+   * mbase/MGMap.[h,cc]:
+     - implemented new member function DrawHexagon
+
+
 
  2006/07/11 Thomas Bretz
Index: /trunk/MagicSoft/Mars/mastro/MAstroCatalog.h
===================================================================
--- /trunk/MagicSoft/Mars/mastro/MAstroCatalog.h	(revision 7788)
+++ /trunk/MagicSoft/Mars/mastro/MAstroCatalog.h	(revision 7789)
@@ -151,4 +151,5 @@
     // Interface to get stars
     TList *GetList() { return &fList; } // Return list of stars
+    UInt_t GetNumStars() const { return fList.GetEntries(); }
 
     // TObject
Index: /trunk/MagicSoft/Mars/mbase/MGMap.cc
===================================================================
--- /trunk/MagicSoft/Mars/mbase/MGMap.cc	(revision 7788)
+++ /trunk/MagicSoft/Mars/mbase/MGMap.cc	(revision 7789)
@@ -274,4 +274,30 @@
 // --------------------------------------------------------------------------
 //
+// Draw a hexagon into the buffer (size w*h) around (x, y) with radius r and
+// the color col.
+//
+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)
+{
+    const Int_t np = 6;
+
+    const Double_t dy[np+1] = { .5   , 0.    , -.5   , -.5   , 0.    ,  .5   , .5    };
+    const Double_t dx[np+1] = { .2886,  .5772,  .2886, -.2886, -.5772, -.2886, .2886 };
+
+    //
+    //  calculate the positions of the pixel corners
+    //
+    Double_t x[np+1], y[np+1];
+    for (Int_t i=0; i<np+1; i++)
+    {
+        x[i] = px + dx[i]*d;
+        y[i] = py + dy[i]*d;
+    }
+
+    for (int i=0; i<6; i++)
+        DrawLine(buf, w, h, x[i], y[i], x[i+1], y[i+1], col, style);
+}
+
+// --------------------------------------------------------------------------
+//
 // Draw a circle into the buffer (size w*h) around (x, y) with radius r and
 // the color col.
Index: /trunk/MagicSoft/Mars/mbase/MGMap.h
===================================================================
--- /trunk/MagicSoft/Mars/mbase/MGMap.h	(revision 7788)
+++ /trunk/MagicSoft/Mars/mbase/MGMap.h	(revision 7789)
@@ -52,4 +52,5 @@
     static UChar_t Color(int col);
     static void    DrawCircle(UChar_t *buf, int w, int h, Float_t x, Float_t y, Float_t r, UChar_t col);
+    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);
     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);
     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);
