Index: trunk/SophyaPI/PI/pidrawer.cc
===================================================================
--- trunk/SophyaPI/PI/pidrawer.cc	(revision 1896)
+++ trunk/SophyaPI/PI/pidrawer.cc	(revision 1897)
@@ -274,4 +274,11 @@
 
 void 
+PIDrawer::SetArrowMarkerAtt(int sz, PIArrowMarker mrk)
+{
+  mArrowMrkSz = sz;
+  mArrowMrk = mrk;
+}
+
+void 
 PIDrawer::SetColMapId(CMapId cid, bool rev)
 {
Index: trunk/SophyaPI/PI/pidrawer.h
===================================================================
--- trunk/SophyaPI/PI/pidrawer.h	(revision 1896)
+++ trunk/SophyaPI/PI/pidrawer.h	(revision 1897)
@@ -77,5 +77,6 @@
   virtual void	     SetFont(PIFontName fn, PIFontSize fsz=PI_NotDefFontSize,
 			     PIFontAtt fat=PI_NotDefFontAtt);
-  virtual void       SetMarkerAtt(int sz=-1, PIMarker mrk=PI_NotDefMarker);
+  virtual void       SetMarkerAtt(int sz=1, PIMarker mrk=PI_NotDefMarker);
+  virtual void       SetArrowMarkerAtt(int sz=5, PIArrowMarker mrk=PI_NotDefArrowMarker);
   virtual void       SetColMapId(CMapId cid=CMAP_OTHER, bool rev=false);
 
@@ -91,4 +92,6 @@
   inline int         GetMarkerSz()  { return(mMSz);  }
   inline PIMarker    GetMarker()    { return(mMrk);  } 
+  inline int           GetArrowMarkerSz()  { return(mArrowMrkSz);  }
+  inline PIArrowMarker GetArrowMarker()  { return(mArrowMrk);  } 
   inline CMapId      GetColMapId()  { return(mCmapid); }
   inline CMapId      GetColMapId(bool & rev)  { rev = mRevCmap; return(mCmapid); }
@@ -170,4 +173,6 @@
   int                mMSz;
   PIMarker           mMrk;  
+  int                mArrowMrkSz;
+  PIArrowMarker      mArrowMrk;
   CMapId             mCmapid;
   bool               mRevCmap;
Index: trunk/SophyaPI/PI/pigraphgen.cc
===================================================================
--- trunk/SophyaPI/PI/pigraphgen.cc	(revision 1896)
+++ trunk/SophyaPI/PI/pigraphgen.cc	(revision 1897)
@@ -238,11 +238,12 @@
 
   if ((pos == 0) || ((posh == PI_HorizontalLeft) && (posv == PI_VerticalBaseLine))) {
-    if (s != NULL)  DrawString(x, y, s, 0);
+    xs = (int)x+sw_s;
+    if (s != NULL)  DrawString(xs, y, s, PI_HorizontalRight);
     xs = (int)x+sw_s+deltaposx;
     ys = (int)y+dyu;
     SelFont(fnt_ss);
-    if (s_up != NULL) DrawString(xs, ys, s_up, 0);
+    if (s_up != NULL) DrawString(xs, ys, s_up, PI_HorizontalLeft);
     ys = (int)y+dyd;
-    if (s_dn != NULL) DrawString(xs, ys, s_dn, 0);
+    if (s_dn != NULL) DrawString(xs, ys, s_dn, PI_HorizontalLeft);
   }
   else {
@@ -254,7 +255,7 @@
       xs = (int)xs+deltaposx;
       ys = (int)y+dyu;
-      if (s_up != NULL) DrawString(xs, ys, s_up, 0);
+      if (s_up != NULL) DrawString(xs, ys, s_up, PI_HorizontalLeft);
       ys = (int)y+dyd;
-      if (s_dn != NULL) DrawString(xs, ys, s_dn, 0);      
+      if (s_dn != NULL) DrawString(xs, ys, s_dn, PI_HorizontalLeft);      
     }
     else if (posh == PI_HorizontalCenter) {
@@ -265,16 +266,17 @@
       xs = (int)xs+deltaposx;
       ys = (int)y+dyu;
-      if (s_up != NULL) DrawString(xs, ys, s_up, 0);
+      if (s_up != NULL) DrawString(xs, ys, s_up, PI_HorizontalLeft);
       ys = (int)y+dyd;
-      if (s_dn != NULL) DrawString(xs, ys, s_dn, 0);            
+      if (s_dn != NULL) DrawString(xs, ys, s_dn, PI_HorizontalLeft);            
     }
     else {
-      if (s != NULL)  DrawString(x, y, s, posv);
+      xs = (int)x+sw_s;
+      if (s != NULL)  DrawString(x, y, s, PI_HorizontalRight | posv);
       SelFont(fnt_ss);
       xs = (int)x+sw_s+deltaposx;
       ys = (int)y+dyu;
-      if (s_up != NULL) DrawString(xs, ys, s_up, 0);
+      if (s_up != NULL) DrawString(xs, ys, s_up, PI_HorizontalLeft);
       ys = (int)y+dyd;
-      if (s_dn != NULL) DrawString(xs, ys, s_dn, 0);
+      if (s_dn != NULL) DrawString(xs, ys, s_dn, PI_HorizontalLeft);
     }
   }
Index: trunk/SophyaPI/PI/pigraphx.cc
===================================================================
--- trunk/SophyaPI/PI/pigraphx.cc	(revision 1896)
+++ trunk/SophyaPI/PI/pigraphx.cc	(revision 1897)
@@ -38,5 +38,6 @@
 xgv.plane_mask = ~0;
 mDefGC = XCreateGC (PIXDisplay(), XtWindow(PIXtTopWdg()), GCFunction | GCPlaneMask, &xgv);
-
+mMrkGC = XCreateGC (PIXDisplay(), XtWindow(PIXtTopWdg()), GCFunction | GCPlaneMask, &xgv);
+mFgMrkGCOK = false;
 Init();
 }
@@ -55,4 +56,6 @@
 xgv.plane_mask = ~0;
 mDefGC = XCreateGC (mDisp, mWId, GCFunction | GCPlaneMask, &xgv);
+mMrkGC = XCreateGC (PIXDisplay(), XtWindow(PIXtTopWdg()), GCFunction | GCPlaneMask, &xgv);
+mFgMrkGCOK = false;
 Init();
 }
@@ -71,4 +74,5 @@
 SelMarker(1, PI_DotMarker);  
 mFCfMap = colpix[PI_Black];  mBCfMap = colpix[PI_White];
+mFgMrkGCOK = false;
 }
 
@@ -77,4 +81,5 @@
 {
 XFreeGC(mDisp, mDefGC);
+XFreeGC(mDisp, mMrkGC);
 }
 
@@ -238,4 +243,5 @@
 }
 
+
 /* --Methode-- */
 void PIGraphicX::DrawArc(PIGrCoord x0, PIGrCoord y0, PIGrCoord dx, PIGrCoord dy, 
@@ -262,56 +268,65 @@
 void PIGraphicX::DrawMarker(PIGrCoord x0, PIGrCoord y0)
 {
-float hmsz = mMrkSz/2;
-float dmsz = mMrkSz-hmsz;
-PIGrCoord x[11],y[11];
-int k;
-PILineAtt clatt;
-
-if (mMrk == PI_DotMarker)
+
+if (mMrk == PI_DotMarker) {
   XDrawPoint(mDisp, mWId, DefGC(), (int)x0, (int)y0);
-
+  return;
+}
 else  {
-  clatt = mLAtt;
-  SelLine(PI_ThinLine);
+  int x1,x2,y1,y2,r;
+  float hmsz = mMrkSz/2;
+  float dmsz = mMrkSz-hmsz;
+  XPoint pxp[12];
+  int k;
+  bool fgcgc = SetupMrkGC();
   switch (mMrk) {
     case  PI_PlusMarker :
-      DrawLine((float)x0-hmsz, y0, (float)x0+dmsz, y0);
-      DrawLine(x0, (float)y0-hmsz, x0, (float)y0+dmsz);
+      x1 = (float)x0-hmsz;   y1 = y0;
+      x2 = (float)x0+dmsz;   y2 = y1;
+      XDrawLine(XtDisplay (MyWdg()), mWId, mMrkGC, x1, y1, x2, y2);
+      x1 = x0;  y1 = (float)y0-hmsz;
+      x2 = x1;  y2 = (float)y0+dmsz;
+      XDrawLine(XtDisplay (MyWdg()), mWId, mMrkGC, x1, y1, x2, y2);
       break;
     case  PI_CrossMarker :
-      DrawLine((float)x0-hmsz, (float)y0-hmsz, (float)x0+dmsz, (float)y0+dmsz);
-      DrawLine((float)x0-hmsz, (float)y0+dmsz, (float)x0+dmsz, (float)y0-hmsz);
+      x1 = (float)x0-hmsz;   y1 = (float)y0-hmsz;
+      x2 = (float)x0+dmsz;   y2 = (float)y0+dmsz;
+      XDrawLine(XtDisplay (MyWdg()), mWId, mMrkGC, x1, y1, x2, y2);
+      XDrawLine(XtDisplay (MyWdg()), mWId, mMrkGC, x1, y2, x2, y1);
       break;  
     case PI_CircleMarker :
-      DrawCircle(x0, y0, hmsz);
-      break;
     case PI_FCircleMarker :
-      DrawFCircle(x0, y0, hmsz);
+      r = hmsz;
+      x1 = (int)x0-r;  y1 = (int)y0-r;
+      if (mMrk == PI_CircleMarker) 
+	XDrawArc(XtDisplay (MyWdg()), mWId, mMrkGC, x1, y1, 2*r, 2*r, 0, 360*64);
+      else XFillArc(XtDisplay (MyWdg()), mWId, mMrkGC, x1, y1, 2*r, 2*r, 0, 360*64);
       break;
     case PI_BoxMarker :
-      DrawBox((float)x0-hmsz, (float)y0-hmsz, mMrkSz, mMrkSz);
-      break;
     case PI_FBoxMarker :
-      DrawFBox((float)x0-hmsz, (float)y0-hmsz, mMrkSz, mMrkSz);
+      pxp[0].x = (int)x0-hmsz;  pxp[0].y = (int)y0-hmsz;
+      pxp[1].x = (int)x0+hmsz;  pxp[1].y = (int)y0-hmsz;
+      pxp[2].x = (int)x0+hmsz;  pxp[2].y = (int)y0+hmsz;
+      pxp[3].x = (int)x0-hmsz;  pxp[3].y = (int)y0+hmsz;
+      pxp[4].x = (int)x0-hmsz;  pxp[4].y = (int)y0-hmsz;
+      if (mMrk == PI_BoxMarker) MrkDrawPolygon(pxp, 5, false);
+      else MrkDrawFPolygon(pxp, 5, false);
       break;
     case  PI_TriangleMarker :
-      x[1] = mMrkSz; y[1] = 0; x[2] = -hmsz; y[2] = -mMrkSz; 
-      x[3] = -dmsz; y[3] = +mMrkSz; x[0] = (float)x0-hmsz; y[0] = (float)y0+hmsz;  
-      DrawPolygon(x, y, 4);
-      break;
     case  PI_FTriangleMarker :
-      x[1] = mMrkSz; y[1] = 0; x[2] = -hmsz; y[2] = -mMrkSz; 
-      x[3] = -dmsz; y[3] = +mMrkSz; x[0] = (float)x0-hmsz; y[0] = (float)y0+hmsz;  
-      DrawFPolygon(x, y, 4);
+      pxp[1].x = mMrkSz; pxp[1].y = 0; pxp[2].x = -hmsz; pxp[2].y = -mMrkSz;
+      pxp[3].x = -dmsz;  pxp[3].y = +mMrkSz; pxp[0].x = (float)x0-hmsz; pxp[0].y = (float)y0+hmsz;
+      if (mMrk == PI_TriangleMarker) MrkDrawPolygon(pxp, 4, true);
+      else MrkDrawFPolygon(pxp, 4, true);
       break;
     case  PI_StarMarker :
     case  PI_FStarMarker :
       for(k=0; k<10; k++) {
-        x[k] = (int)(starcoordx[k]*hmsz+(float)x0+0.5);
-        y[k] = (int)(starcoordy[k]*hmsz+(float)y0+0.5);
+        pxp[k].x = (int)(starcoordx[k]*hmsz+(float)x0+0.5);
+        pxp[k].y = (int)(starcoordy[k]*hmsz+(float)y0+0.5);
         }
-      x[10] = x[0];   y[10] = y[0];
-      if (mMrk == PI_StarMarker)  DrawPolygon(x, y, 11, false);
-      else DrawFPolygon(x, y, 11, false);
+      pxp[10].x = pxp[0].x;   pxp[10].y = pxp[0].y;
+      if (mMrk == PI_StarMarker)   MrkDrawPolygon(pxp, 11, false);
+      else  MrkDrawFPolygon(pxp, 11, false);
       break;
     default :
@@ -319,5 +334,5 @@
       break;
     }
-  SelLine(clatt);
+  if (fgcgc) mFgMrkGCOK = false;
   }
 
@@ -340,6 +355,9 @@
   if (n > NMXXPOINTS)  delete[] pxp;  
   }
-else for(i=0; i<n; i++) DrawMarker(x[i], y[i]);
-
+else { 
+  SetupMrkGC();
+  for(i=0; i<n; i++) DrawMarker(x[i], y[i]);
+  mFgMrkGCOK = false;
+}
 return;
 }
@@ -385,4 +403,38 @@
 return;
 }
+
+/* --Methode-- */
+bool PIGraphicX::SetupMrkGC()
+{
+if (mFgMrkGCOK) return(false);
+XCopyGC(mDisp, DefGC(), GCFunction|GCForeground|GCBackground|GCPlaneMask, mMrkGC); 
+XSetLineAttributes(mDisp, mMrkGC, 1, LineSolid, CapButt, JoinMiter);
+mFgMrkGCOK = true;
+return true;
+}
+
+/* --Methode-- */
+void PIGraphicX::MrkDrawPolygon(XPoint *pxp, int n, bool cinc)
+{
+
+if (n <= 0)  return;
+int mode = CoordModeOrigin;
+if (cinc) mode =  CoordModePrevious;
+XDrawLines(mDisp, mWId, mMrkGC, pxp, n, mode);
+
+return;
+}
+
+
+/* --Methode-- */
+void PIGraphicX::MrkDrawFPolygon(XPoint *pxp, int n, bool cinc)
+{
+int mode = CoordModeOrigin;
+if (cinc) mode =  CoordModePrevious;
+XFillPolygon(XtDisplay (MyWdg()), mWId, mMrkGC, pxp, n, 
+                        Complex, mode);
+return;
+}
+
 
 
Index: trunk/SophyaPI/PI/pigraphx.h
===================================================================
--- trunk/SophyaPI/PI/pigraphx.h	(revision 1896)
+++ trunk/SophyaPI/PI/pigraphx.h	(revision 1897)
@@ -91,6 +91,12 @@
     {XSetForeground(mDisp, DefGC(), col);  mFCol = PI_ColorFromMap; mFCfMap = col; }
 
+  bool           SetupMrkGC();
+  void           MrkDrawPolygon(XPoint* pxp, int n, bool cinc);
+  void           MrkDrawFPolygon(XPoint* pxp, int n, bool cinc);
+
 //  Structure et identificateur XWindow  associe
   GC mDefGC;
+  GC mMrkGC;
+  bool mFgMrkGCOK;
   Display* mDisp;  // Display X associe
   Drawable mWId;   // Identificateur Window/Drawable X
